2,891 questions
0
votes
1
answer
75
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
139
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
35
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
72
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
109
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
118
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
132
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
88
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
179
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 ...
0
votes
1
answer
855
views
Google Cloud Run - metrics
CPU/Memory usage metrics
I'm trying to read the cpu and memory usage metrics of GCP cloud run and I understand from answer posted in Google Cloud Run: interpreting CPU utilization metrics for ...
2
votes
1
answer
632
views
Does Docker have support for cgroup v2's cpu.weight knob?
When the docker container was running in v1 we simply passed --cpu-shares values in the run command and as we all know in cgroup v2, we don't have cpu.shares knob available, it was replaced with cpu....
0
votes
1
answer
221
views
Impact of high CPU usage on a background thread execution in Java
Context
There are many ways of creating a "background thread" in Java. I want to spin off exactly one thread that keeps running in the background. I'm using ScheduledExecutorService for this....
2
votes
0
answers
150
views
Jetpack Compose with just one button uses too much CPU
I'm new to Jetpack Compose, and I was trying it.
I'm using IntelliJ IDEA, and I'm making one for desktop.
I created a new Jetpack Compose with IntelliJ IDEA, and I runned it nothing changed with ...
0
votes
0
answers
143
views
Selenium gets my cpu to 100% even after using driver.quit()
I am trying to crape data form a website using selenium and chromedriver and I need the tab to run at least 6 hours straight. I know the chrome driver creates many tabs at the same time like this:
...
0
votes
2
answers
79
views
Parallel Computing and usage of CPUs
I have a conceptual question. I have a MATLAB code for simulating a beam propagation (optics) which has lots of for loops inside it but every iteration in a loop depends on the previous one (n+1 th ...
1
vote
1
answer
98
views
Can time slicing and context switches cause high CPU utilization in a Java based application?
I have a Play framework application with about 400 threads. 200 are part of the default dispatcher.
Now I have 2 db sources with 9 connections each and thread pool with a min size of 20 and max of 200....
0
votes
0
answers
127
views
Intermittent CPU Usage Limitation During PyTorch Training on Windows (Jupyter Notebook)
I'm facing an issue with my PyTorch model training on Windows 10 using Jupyter Notebook. I've written a Python script to train a LSTM model over 500 epochs. The training process sometimes uses 100% of ...
0
votes
1
answer
182
views
Why does the psutil CPU tracker not work in Google Cloud Run?
I'm currently working on a Tracker of CPU & RAM in python using psutil. I've made some tries locally and everything appears to work fine, but, when I deploy to Google Cloud Run, the tracker is not ...
3
votes
0
answers
344
views
How to get RAM and CPU usage percentages that match with values shown in Task Manager
I need to get the percentage of CPU and RAM usage at a given time using .net core 8 WEB API accurately with the figures shown in Task Manager.
The problem I'm facing is the percentages of the value I ...
1
vote
0
answers
623
views
How to show InstanceName along with Instance ID in Grafana (Cloudwatch datasource)
I am using grafana with cloudwatch datasource.
The legend of the line graph when querying metrics like cpuutilization (filtered by instanceID =*) only shows instanceID. It will be useful to show ...
0
votes
0
answers
109
views
Excel VBA High CPU usage
I have an Excel VBA program with a user form. The user form has two command buttons, one is to sort and the other is quit. When I put a break on the End Sub statement if the CmdSort_Click(), and hit ...
-1
votes
1
answer
290
views
Right metric for CPU usage VM qemu-kvm
I am using qemu-kvm (libvirt) on Ubuntu 20.04. I've created virtual machine with 8 CPU and installed node-exporter on vm and libvirt-exporter on hv.
Node exporter on virtual machine says that CPU ...
0
votes
0
answers
86
views
How to find the number of CPU cores are currently being utilised in a system using Powershell?
Let's say my system have 16 CPU cores.Now i have a use case to find the number of cores are actually being utilized in a system like 2 cores are being used something like this ?
I want to know is ...
1
vote
1
answer
348
views
Default n_workers when creating a Dask cluster?
Simple question. If I create a Dask cluster using the following code:
from dask.distributed import Client
client = Client()
How many workers will it create? I ran this code on one machine, and it ...
2
votes
1
answer
156
views
Investigating timeout in Karafka server: CPU utilisation, Memory utilisation, max.poll.interval.ms
I have a rails application, which includes an API server(rails server) and Worker server(Karafka server).
From the API server we send some messages to topic T1 (has just 1 partition), now the Worker ...
3
votes
0
answers
447
views
Does std::steady_clock::now() make a syscall in Linux?
My project is a long time daemon service and need to busy check some conditions and take actions as soon as possible.
I want to use std::steady_clock to account the responsing time of my service and ...
-2
votes
1
answer
240
views
High CPU usage when idle
I would like to get an answer for this question: Why when no actions are being performed, my python program takes 14% of CPU, but when actions inside the loop are performed (toggle) it is only at 4%? (...
0
votes
0
answers
77
views
Azkaban Executor Java Process CPU usage very high, The "top" command shows high sys usage
I have an Azkaban executor server process, which is a Java service.
I noticed that when running a random sleep script, the CPU usage becomes very high, consistently exceeding 2000%, and the "top&...
1
vote
0
answers
142
views
Error Using Valgrind's callgrind and kcachegrind on a C++
I've been trying to analyze a simple C++ program that uses fork() to create a child process. The program compiles and runs fine. But, when I try to use Valgrind's callgrind tool to profile the program,...
0
votes
0
answers
134
views
Having issue with CPU boosting on AMD
Background. I am the author of an application that emulates a Tandy Color Computer (Motorola 6809). This app has been stable for five years.
Lately I have noticed some strange CPU boosting issues ...
1
vote
0
answers
401
views
Databricks SQL Query Never Executes (15+ hour runtime)
I am connecting to a database to run SQL queries that is hosted on Azure Databricks.
My cluster specs below:
I have multiple SQL queries in my notebook, all nearly identical in structure. I pull data ...
0
votes
0
answers
70
views
Python script becomes unresponsive at 100% CPU usage (single core)
I am trying to make a measurement using the CAEN DT5742 16-channel digitizer using the library CAENPy which is basically just a wrapper around the actual CAENDigitizer.
My program scans an area with a ...
0
votes
0
answers
575
views
CPU usage reported in /proc/stat is inconsistent (wrong number of cpu ticks)
Summary of the issue:
In order to report CPU usage per core, I decided to rely on /proc/stat file populated by the kernel. I am running an application inside a Docker container, mapped to core 1 on my ...
0
votes
0
answers
44
views
measuring CPU utilization objectively under load
So I have a thread which does some work. Some of this work is optional and I would like to dynamically adjust how much work is being attempted based on CPU allocation. In other words I would want to ...
0
votes
1
answer
104
views
using while in swift for checking condition makes iOS phone over heated
I'm trying to implement a simple game, in iOS using swift. game is turn bases; first player moves, then second player, then first, ...
I'm using a protocol for this:
class PersonAgent: AgentProtocol {
...
3
votes
1
answer
182
views
Too much CPU usage of MediaProjection leaving less for OCR?
I am taking screenshots on Android with two different methods:
By running /system/bin/screencap -p $path.
With the MediaProjection API.
Even though it's the exact same screen, when performing OCR (...
2
votes
0
answers
95
views
Returning a Value from a .bat File to CFEXECUTE
I have a batch file with the following code to pull the current server CPU usage:
@echo off
for /f "tokens=2 delims==" %%i in ('wmic cpu get loadpercentage /value ^|find "="') do ...
0
votes
0
answers
33
views
pyserial - CPU usage when servicing 2 queues
I'm attempting to service a serial port which gets and puts data to two queues (multiprocessing queues, if that matters) sequentially. My logic is that a modern CPU should be able to read some bytes ...
0
votes
1
answer
551
views
CPU utilization sometimes reaches 100% and sometimes gives different results when i perform execution same testes with JMeter
I am using JMeter(in distributed mode) for load testing. Its a React web application and mongo db database. Application server and database server are two different images.
If i put 1 user's load, ...
1
vote
1
answer
2k
views
Linux Kernel CFS CPU Usage explained
I'm trying to understand better how Linux's CFS (Completely Fair Scheduler) works behind the scenes to make some improvements on the Kubernetes side.
Well, let's imagine I have a Processor with 1 core ...
0
votes
1
answer
218
views
Selenium uc webdriver chrome instances proliferating, eating up all memory and CPU
I have included steps to close the selenium python webdriver, and even restart it regularly to avoid accumulating problems. But my Windows 10 Task Manager shows a steady increase in memory and CPU ...
0
votes
0
answers
309
views
Prometheus node_exporter promql query to get aggregated daily peak (max) and avg CPU utilisation per node
What I need to obtain is a daily aggregation of the avg and max (peak) CPU utilisation per node/instance. So, the metric in question is:
node_cpu_seconds_total{mode!="idle"}
Exposed by ...
0
votes
1
answer
1k
views
Downloading File as ByteArray Vs Resourse which is better with less memory usage
One of the download we are using byte[] as return type
@PostMapping("/downloadReport")
public ResponseEntity<byte[]> downlodReport(@RequestBody Request request) {
byte[] ...
1
vote
0
answers
962
views
WMI Provider Host high CPU usage
I've noticed high CPU usage on our win 2019 server from a process in task manager called WMI Provider Host. We are hosting several .net applications (and services) on the server, and I wanted to ...
1
vote
0
answers
327
views
CPU performance counters in C++ (Mac/PC, Intel)
I want to measure specific parts of my code to understand how well they perform. I already found the following:
How to get the CPU cycle count in x86_64 from C++?
...which allows me to easily ...