Questions tagged [cpu-usage]

CPU usage indicate how much of a workload is being handled by the CPU.

CPU-usage or CPU time is the amount of time for which a central processing unit (CPU) was used for processing instructions of a computer program.

CPU time accounting :http://public.dhe.ibm.com/software/dw/linux390/perf/CPU_time_accounting.pdf

2881 questions
1
vote
3 answers

CPU contention (wait time) for a process in Linux

How can I check how long a process spends waiting for the CPU in a Linux box? For example, in a loaded system I want to check how long a SQL*Loader (sqlldr) process waits. It would be useful if there is a command line tool to do this.
Abu
  • 303
  • 1
  • 4
  • 12
1
vote
0 answers

Bad Performance of Buffer in Linux + Golang

I've got this code package main import ( "bytes" "log" "net/http" "strconv" "time" ) func main() { http.HandleFunc("/", Method) log.Printf("Server Started") log.Fatal(http.ListenAndServe(":8080", nil)) } func…
Carlos Andrés García
  • 1,483
  • 2
  • 15
  • 30
1
vote
1 answer

Get certain processor CPU usage using C#

I found the below code on Google to get certain processor CPU usage int processorCount = Environment.ProcessorCount; PerformanceCounter myAppCpu = new PerformanceCounter( "Process", "% Processor Time", "chrome", true); float cpuUsage =…
elsonwx
  • 1,431
  • 3
  • 16
  • 26
1
vote
2 answers

how to operate typeperf on non-English versions of windows?

i found this nice log-creating command line: typeperf "\Processor(_Total)\% Processor Time" so far it worked for me well on an English language version of Windows 7 (or similar). when trying out the very same thing on a German language Windows…
alex
  • 111
  • 1
  • 11
1
vote
1 answer

How to get CPU usage on a multi core system

How to know the CPU usage in percentage on multi core system. I tried the below sample code using os npm but it does not return the result what I am actually looking into it. I am expecting the result something similar to linux top command. Any help…
user4324324
  • 559
  • 3
  • 7
  • 25
1
vote
1 answer

100% CPU on my webpage after loaded - how to debug?

I try to optimize my program which is taking over 107% of CPU usage on Ubuntu for a specific page and less for the other ones (70% - also showing multiple gages but differently - , 5% showing other data (which is not showing gages), etc...). My page…
sincos
  • 127
  • 2
  • 18
1
vote
2 answers

Android : Change priority application for rooted device

I have a single-board computers that runs on a rooted android version. I have an application that uses opencv that demands much CPU usage. Sometimes the performace of the application falls because another process is running on android OS. I wonder…
1
vote
0 answers

Android studio emulator uses heaps of cpu?

I'm making an application for android through android studio and when I run it on my physical phone it has no issues using up to 15% CPU maximum but when I ran it on a Nexus 5 emulator it goes up to 100% CPU just when pressing a button that doesn't…
1
vote
1 answer

The most efficient way to resize cv::Mat

all I'm writing an image processing program, which uses cv::resize(INTER_LINEAR) hundreds of times for one frame. However, I found cv::resize() is a cpu-killer and it is the hot spot in my program. Are there better ways to resize the image with less…
wking
  • 1,293
  • 1
  • 16
  • 27
1
vote
2 answers

How to maximize cpu usage with Eigen and OpenMP

I have a 4-core cpu and I am trying to optimize my code to reduce my calculation time on products of 2000x2000 Eigen matrix. Since I am using OpenMP I was expecting to reach 400% of CPU usage. But, for some reason I am stuck at 200%. I am using…
Arkhan
  • 99
  • 11
1
vote
1 answer

Apache/PHP using 100% CPU while trying to free cache space

I created a script for use with my website that is supposed to erase the oldest entry in cache when a new item needs to be cached. My website is very large with 500,000 photos on it and the cache space is set to 2 GB. These functions are what cause…
Mike -- No longer here
  • 2,064
  • 1
  • 15
  • 37
1
vote
4 answers

Using session to reduce CPU load

I have a page which performs following operations: Executes a query in a DB (More precisely, select u.user_uid, ut.user_metatada from users u, user_tag ut where u.uid=ut.uid. One user can have one or more metadatas) Generates an array of data based…
Bakhtiyor
  • 7,198
  • 15
  • 55
  • 77
1
vote
1 answer

NodeJS - Memory/CPU management with MongoJS Stream

I'm parsing a fairly large dataset from MongoDB (of about 40,000 documents, each with a decent amount of data inside). The stream is being accessed like so: var cursor = db.domains.find({ html: { $exists: true } }); cursor.on('data',…
JVG
  • 20,198
  • 47
  • 132
  • 210
1
vote
2 answers

How Java program divided between CPUs (in multi CPUs systems)

I start Java my Java application on system with 16 CPUs, but mostly loads on first CPU. Is it normal? If not, how can I repair it? top - 18:40:52 up 42 days, 22:18, 2 users, load average: 8.36, 11.87, 15.61 Tasks: 214 total, 2 running, 212…
EK.
  • 2,890
  • 9
  • 36
  • 49
1
vote
1 answer

Environmental performance parameters for applications on Linux

I have two physical, "identical" Linux RedHat servers. I ran a small program on both of them. My problem: the CPU usage of my program varies between both servers. I am not a Linux expert. I am wondering what could lead to that performance…
Incanus
  • 389
  • 1
  • 4
  • 16