Questions tagged [cpu-usage]

1

votes
1

answer
34

Views

Program suddenly has a spike in cpu usage and looks like it is paused

I have added 2 functions: int aiCheckScore(char arr[7][7], int inp, int height, Player player) int aiFindMostRelevant(char arr[7][7], Player player) The first makes a score for a given position in a 2D array. The score is equal to how many of the same kind elements we would have in a row (verticall...
alex999ar
4

votes
3

answer
113

Views

How can I get the CPU usage of a process with “tasklist” in Windows

I am writing a program in Java to periodically display the CPU and memory usage of a given process ID. My implementation invokes tasklist. It is pretty straightforward to get the memory usage by the following command: tasklist /fi 'memusage ge 0' /fi 'pid eq 2076' /v This will return the memory usag...
JakeSmitch
1

votes
1

answer
2.9k

Views

Get Thread Cpu Usage

I have a set of cpu consuming executions that each run in thread with low priority. These threads will be run in a Process (Like IIS) that have many other threads that I don't want to slow them. I want to calculate the cpu usage of all other threads and if its greater than 50% then i pause one of my...
mrd abd
1

votes
0

answer
62

Views

Process Cpu time increases gradually

In our linux systems we observe that cpu load, heap usage of a java server is normal but OperatingSystem.ProcessCpuTime is gradually increasing, drops to minimum value and increased again. We have 2 cores in linux system. could you clarify me on these below: 1) as example in above picture, what is...
santosh.a
1

votes
0

answer
245

Views

Java - Write Excel Using POI, CPU consuming

My program generate some Excel using apache POI. This part take up 50% of CPU for 1 excel.. If users generate at the same time multiple excel the server is out... How can i reduce it ? final Workbook workbook = new HSSFWorkbook(); initDataFormat(workbook); EnumMap sheetMap = sheetMap = BomXlsSheetEn...
Alexandre
1

votes
1

answer
1.9k

Views

Optimize read from .gz file and cpu utilization python

Sample Input File: 83,REGISTER,0,10.166.224.34,1518814163,[sip:[email protected]],sip:[email protected],3727925550,0600,NULL,NULL 83,INVITE,0,10.166.224.34,1518814163,[sip:[email protected]],sip:[email protected]
van neilsen
1

votes
0

answer
41

Views

Spring REST CPU usage limiting among endpoints

I have a Spring REST API. Let's say /students/122/gpa endpoint gives us GPA of the student with id=122 Let's assume that we are pre-calculating all GPA data and write into an HashMap. I don't want to query database for each request. The problem is: GPA calculation process (let's sat /calculate end...
Denny
1

votes
0

answer
286

Views

NUMA: Win10 CPU utilization

I develop a multithreaded cpu-intensive application. Until now this application has been tested on multicore (but single-cpu) systems like an i7-6800K and worked well under Linux and Windows. A newly observed phenomenon is that it does not run well on certain sever hardware: 2 x Xeon E5 2660 v3: Whe...
Geom
1

votes
1

answer
1k

Views

get cpu, disk, memory and network usage of applications running inside vm

I am trying to get cpu usage, disk io, memory usage and network usage of all applications inside a virtual machine. I googled and find that for VM wise we can get the above data using powercli or powershell. But I want to get it from application level. If I have authentication to access the vm then...
M. P
1

votes
1

answer
215

Views

How can I stop facebook crawler causing high CPU usage

Hi I've recently been getting super high spikes in Apache CPU usage, Apache memory usage and MySQL memory usage. It turns out that crawlers were accessing my site at a very aggressive rate, specifically Facebook. I attempted to add a crawl delay for the facebook crawler to the robot.txt file, as see...
Jake Jacobs
1

votes
0

answer
146

Views

How to measure elapsed CPU time of JS code execution in Node.js for benchmarking?

I have a function that does simple performance benchmarking of arbitrary JS function invocation like this: function benchmark(f) { var startTime = Date.now(); f(); var endTime = Date.now(); console.log('Elapsed: %d ms', endTime - startTime); } The functions that I test with it take typically 2-5s to...
cpcallen
1

votes
0

answer
63

Views

How to read .xhprof files?

I have .xhprof files generated from XHProf and UProfiler. Tried using SugarCrm XHProf Viewer and UProfiler viewer, but both of them doesn't read .xhprof files. Do I have to do any conversion to read this reports?
karthikeayan
1

votes
0

answer
436

Views

Tensorflow CPU usage >100% when the whole graph is running on GPU

I have simple tensorflow code: import tensorflow as tf from tensorflow.python.client import timeline zeros = tf.zeros(shape=(1000, 1000)) a, b = tf.while_loop( lambda a, b: a < 1000, lambda a, b: (a + 1, tf.matmul(zeros, zeros)), (0, zeros)) with tf.Session() as sess: options = tf.RunOptions(trace_l...
Dmitry Andreev
1

votes
1

answer
71

Views

How to reduce consumption of CPU in audio recording program (c++)

with help of the internet I wrote program that capture audio from microphone all time when it's running. Everything it's ok, but I need to reduce charge of CPU, because now it's about 30-35%. int SoundCapture() { const int NUMPTS = 8000 * 1; // Sample rate * seconds int sampleRate = 8000; short int...
dylo
1

votes
0

answer
35

Views

Compute Engine Resources CPU Usage

I'm running a data processing job on Google Compute Engine and I noticed that while my process is at 100% CPU Usage, the total is more at like 12% CPU Usage. Can someone explain the difference between the number for the PID and the number for total usage? Also, am I wasting compute resources since t...
Max Chang
1

votes
1

answer
514

Views

Visual Studio Code using large amounts of CPU

I'm running Windows 10. VSCode, even when idle, takes up a consistent 26-30% of my cpu. I tried code --disable-extensions in CMD to check if an extension was causing the problem, but my performance was the same as with extensions. When I used sublime text, I had a similar issue with the editor using...
agreis1
1

votes
0

answer
34

Views

Does mongoose promise error result in high CPU usage for queries?

I am posting it as a separate question as I am new here and hence I'm unable to comment. The answer I viewed here says the Mongoose promise error can be fixed by adding the following line before mongoose.connect and before declaring any schema (if mongoose is referenced there as well): mongoose.Pro...
Unais K
1

votes
1

answer
39

Views

Maximum percentage of RAM process should used

In a nutshell: I'm a computational scientist and I have an expensive (CPU-time) simulation to run on a computer cluster. The most CPU-intensive part of my program is a binary tree structure which is used to accelerate my code. The tree grows as the simulation progresses and the bigger the tree the b...
solalito
1

votes
1

answer
38

Views

Get Operating system,disk space of connected computers windows

Using c# I want to get OS name, disk space, CPU usage of the connected machine to my server. I can get connected machine name by using the following code foreach (DirectoryEntry computers in root.Children) { foreach (DirectoryEntry computer in computers.Children) { if (computer.Name...
farrukh aziz
1

votes
0

answer
109

Views

glReadPixels() burns up all CPU cycles of a single core

I have an SDL2 app with an OpenGL window, and it is well behaved: When it runs, the app gets synchronized with my 60Hz display, and I see 12% CPU Usage for the app. So far so good. But when I add 3D picking by reading a single (!) depth value from the depth buffer (after drawing), the following happ...
Bram
1

votes
0

answer
26

Views

What is this VS2017 CPU usage call tree telling me?

What does it mean when the VS2017 CPU usage call tree says [Broken] and the total CPU doesn't even come close to adding up? I'm not sure if this is related to Call Tree view in CPU Usage window is unusable, which Microsoft considers working as intended. I've inherited an ASP.NET MVC app that serves...
TKK
1

votes
2

answer
32

Views

VAST difference in execution time for simple loop: How come?

I have noticed a VAST difference in execution time for even a simple loop on two similar but different devices, i.e. a Samsung Galaxy S4 and S7. On the S7 the test below takes ~5 msec and on the S4 ~250 msec, a 50X difference. I'm sure the S7 is faster than the S4, but 50X??? I've tried the Androi...
DontPanic
1

votes
1

answer
57

Views

AWS Cloudwatch shows CPU Utilization very low each time ECS scaling

For each time ECS Fargate service scales in or out, Cloudwatch show the CPU utilization with very low percent (about 2 -> 3%) (same with Memory) on graph and then it will be increased gradually although before that time, it's quite high (polices: 80% for scaling out, 40% for scaling in). I just w...
tuq
1

votes
0

answer
122

Views

How to get cpu usage percentage in macos with Swift?

I'm trying to do an activity monitor for MacOS (I know that there is a mac app called activity monitor that tell that) so I want to get the cpu usage percentage with Swift. I found some similar questions but they only work with iOS. I also found a question in Objective-C but not in Swift and I don't...
eldelosrobots
1

votes
0

answer
30

Views

PHP processing time and CPU usage with million rows comparing

I have a tool witch compare one string with, on average - 250k strings from database. Two tables are used during compare process - categories and categories_strings. In string table there is around 2.5 million rows while pivot - categories_string contains of 7 million rows. My query is pretty simple...
ficus
1

votes
0

answer
64

Views

How to get CPU instruction count for a thread?

I know that getrusage() can provide per-thread CPU utilization, but only the time spent on the CPU. Is there any way to get the number of executed CPU instructions? Or the number of cycles spent on the cpu? Basically, I need to find a reproducible measure of how much the thread spends on the CPU. An...
LaszloLadanyi
1

votes
1

answer
63

Views

AWS CloudWatch - 100% CPU Utilization

I have an AWS M4.Large EC2 instance running a Magento e-commerce site that is experiencing consistent max CPU usage spikes at a regular interval: 10 minutes at 100% CPU, followed by 20 minutes at 40-50% CPU. I've included a screenshot below. I am trying to identify the cause of these routine spikes,...
Kautz
1

votes
0

answer
104

Views

Usage of CPU/GPU while using Stitching() in OpenCV & OpenCL

Specs : Visual Studio 2017 ; OpenCV 3.4 I am trying to run the stitching algorithm of OpenCV on my computer GPU. To do that I use the OpenCL library, which is inclued in a transparant API in OpenCV (https://www.learnopencv.com/opencv-transparent-api/). I am monitoring my GPU and CPU activity using...
A.T.
1

votes
2

answer
37

Views

How can I pause resume of all thread?

My use case: A process -> request pause/resume(via IPC) -> B process My purpose is to save CPU usage of B process when B process is background. Because all threads of B process are consuming CPU usage. So that I want to pause/restart all threads of B process when I wanted. Q1) how can I pause/resum...
Hercoa
1

votes
1

answer
40

Views

calculating cpu usage in nodejs

I'm trying to calculate the CPU usage on the computer running my nodejs app but for some reason the output is a lot higher than what my system monitor on ubuntu is showing me. Here is my code: const cores = _.map(os.cpus(), 'times') const free = _.sumBy(cores, 'idle') const total = _.sumBy(cores, c...
ninesalt
1

votes
1

answer
36

Views

Python script runs manually on google vm, but gets killed if put in while true loop for scheduling

I have a python script that runs fine when I run it via python3 script.py & on the the google vm, but then when i detach it with a screen and leave it run a couple iterations on its own I come back to check and it gets killed. I think it might be something to do with high cpu usage, i tried to do a...
Raymond Deng
1

votes
1

answer
43

Views

How to make H2O driverless AI use more cores on CPU?

My machine has 20 cores on its CPU, but when running Driverless AI, it uses only 4 of them.How can I make it use more cores for faster results?
Roshan Shah
1

votes
1

answer
43

Views

n_jobs = -1 equivalent in keras

I have recently started learning deep learning. In machine learning using sklearn library with n_jobs = -1 all my cpu cores are used and this speeds the grid search. Now I am trying to fit an rnn model on training data, which is taking a lot of time . Is there a way I can speed up the training. # In...
Chinni
1

votes
1

answer
28

Views

pytesseract eats CPU too high

In Ubuntu 16.04 LTS, the pyteserract script eats too high, and it causes system reboot intermittenly. The top command output is top - 21:23:31 up 27 min, 4 users, load average: 3.27, 1.86, 1.28 Tasks: 290 total, 2 running, 216 sleeping, 0 stopped, 0 zombie %Cpu(s): 87.5 us, 0.7 sy, 0.0 ni,...
Marcel Kim
1

votes
3

answer
3.2k

Views

SQL Server 2000: Server memory / CPU parameters in Query Analyzer

SQL Server 2000: Is there a way to find out server memory / CPU parameters in Query Analyzer?
1

votes
1

answer
345

Views

CPU-Core thread classification Function

I'm going to be writing a multi-threaded shared memory messaging system for ultra high-volume message delivery between processes. The messages will originate from the worker threads of a web-server. I'd like to exploit the CPU cache locality that cores on the same CPU share. So that when I wake up a...
Hassan Syed
1

votes
1

answer
1.4k

Views

How to get CPU utilization on jsp

I need to get the cpu usage of the current process using jsp. My scenario is like when user navigate from one page to other I need to check the cpu utilization, memory usage of the process.
Santhosh
1

votes
1

answer
767

Views

Application.Idle causes high CPU usage

I use the Application.Idle event to handle toolbar status (enable/disable) etc. quite extensively. As I'm beta testing Norton AntiVirus 2011, it brought to my attention that my app that I'm developing triggered a high CPU usage warning on at least one CPU. Sure enough, I opened the task manager an...
Neal
1

votes
1

answer
156

Views

We have a problem with the CPU utilization going up to 380 % on a 4 core machine [closed]

We had the problem when the CPU util on a single core machine went to 100 %. The number of users is 8-10 on a server hosted at the ISP end. When the server was upgraded to 4 core, the same problem persists. We have used Hibernate and JSF for implementation and MySQL as the backend. I strongly feel i...
Ananth
1

votes
1

answer
940

Views

GIF animation CPU consumption problem in C#!

I have made a GIF Animation user control which loads gif animations and have created about 30 of them in my project each animating a GIF. The problem is that when I check my CPU usage it is about 70%+!!! I'm sure something is wrong with this! Please help me. Here is the code of that GIF Animator con...
Moh

View additional questions