2,892 questions
-2
votes
0
answers
61
views
How to make sure that server is always available (at least to do SSH) under high CPU and mem usage? [closed]
I want to reserve some CPU and mem for SSH in case of high CPU and mem usage, so that I can go inside the server troubleshoot and kill the process consuming most resources.
I have used the below to ...
0
votes
1
answer
78
views
How should CPU time be computed for calculations parallelized with the multiprocessing module?
I am trying to measure the processing time, or CPU time, of a CPU-intensive computation that has been parallelized with multiprocessing. However, simply bookending the parallelization of the ...
1
vote
0
answers
145
views
Python processes arent being evenly distributed over cpu nodes
I wasn't able to find anything regarding this on the internet: I am using multiprocessing (concurrent.futures. ProcessPoolExecutor(max_workers=(...)) as executor) to execute several DRL training ...
3
votes
0
answers
114
views
CPU running hot on JFrame resizing
Can you ever make frame resizing at least somewhat reasonable in terms of the CPU usage?
Here's a bare-bones demo. It's just a JFrame with a JPanel inside it, that's it. Aggressively resize it (press ...
0
votes
1
answer
76
views
How can I scale the number of concurrent workers based on the available CPU (Windows)?
My current implementation tries to figure out the available CPU in percents and then spawn new workers as long as there is at least 5% available.
Here is the code:
public class CpuAvailabilityMonitor
{...
0
votes
0
answers
40
views
Python runs with one cpu core on remote system and automatically uses multiple on local system
Running a python script on my local system (linux based) using the terminal utilizes ~4-6 cpu cores simultaneous.
If I run the same script via ssh connection on a remote system (linux based) limits ...
0
votes
0
answers
38
views
Get CPU Usage in Dotnet on MacOS
I have some C-Sharp code, running on MacOS(Sequoia), and I measure its resource usage by calling these two functions before and after, and subtracting.
public static long GetClockTime()
{
var ...
0
votes
1
answer
73
views
Websocket load test utilising high cpu and memory of the VM used for testing
I'm running api load tests with a script that's a combination of REST and websocket APIs. The resource utilisation of the VM where I'm using jmeter to execute load tests is much higher than before ...
0
votes
1
answer
111
views
How can I retrieve the CPU usage of my Mac in the form of a percentage and put that into an updating variable?
I'm coding a Mac app in SwiftUI 6.0.3 and Xcode 16. My Mac is up to date with macOS Sequoia 15.3.1. I'm trying to have a menu bar item that updates at an interval with the percentage of the CPU that I ...
1
vote
2
answers
120
views
How can I efficiently measure average CPU usage for a group of processes (bash coprocs + their children) on linux?
BACKGROUND: I wrote a bash function called forkrun that parallelizes code for you in the same way that parallel or xargs -P does. It is faster than parallel, and similar in speed to but has more ...
0
votes
1
answer
72
views
Does creating multiple Node.js processes improve performance for I/O-bound tasks in a web server?
Say I have a Node.js server handling thousands of requests that are primarily I/O-bound (e.g., network requests, filesystem requests). The server runs on a multi-core CPU (e.g., 4 cores).
Does ...
0
votes
0
answers
137
views
Linux kernel cgroup v2 CFS - cpu throttled_usec accounting?
In Linux kernel cgroup v2’s CFS scheduler, how is cpu.stat throttled_usec accounted when a cgroup with multiple threads gets throttled during a single quota period?
Specifically, is throttled_usec ...
0
votes
0
answers
89
views
How to get correct CPU usage like in task manager using Python?
I am using psutil but the values I get is between 0 and 2% whereas the task manager is showing values way above that from 8 to 40% CPU usage. Am I missing something?
import sys
import psutil # To get ...
0
votes
2
answers
72
views
How to decrease CPU usage by an extensive loop?
I am creating a script that prints an ASCII picture. I need to separate each individual character in a tag, though the page gets too laggy and the CPU usage goes up by an extreme amount when ...
1
vote
1
answer
188
views
vs2019 Performance Profiler no CPU usage display, All tools are not available.What should I do?
OS: Windows 11 Home 10.0.22631
CPU: Intel i7-13700,2100Mhz
Memory: 48GB
Vsiual Studio Enterprise 2019 Version 16.11.31.
It's a mixed C and C++ project.
When I switch Visual Studio to Chinese, memory ...