The CPU (Central Processing Unit), is the chip in the computer that actually performs the operations and calculations that are done as a program runs. It is essentially what executes a program.

learn more… | top users | synonyms (1)

51
votes
3answers
25k views

What do the flags in /proc/cpuinfo mean?

How can I tell whether my processor has a particular feature? (64-bit instruction set, hardware-assisted virtualization, cryptographic accelerators, etc.) I know that the file /proc/cpuinfo contains ...
46
votes
1answer
53k views

In Linux “top” command what are us, sy, ni, id, wa, hi, si and st (for CPU usage)?

When I issue $ top in linux, I get a result similar to this (see here). One of the lines has CPU usage information represented like this: Cpu(s): 87.3%us, 1.2%sy, 0.0%ni, 27.6%id, 0.0%wa, ...
23
votes
1answer
2k views

High CPU usage with CFS?

I asked a previous question to try and isolate the source of an increase in CPU usage when moving an application from RHEL 5 to RHEL 6. The analysis that I did for that seems to indicate that it is ...
22
votes
4answers
2k views

How to limit resource usage to save CPU+RAM for a certain process?

I have a dev server on which sshd sometimes stops working because the machine runs out of RAM. Yes we are running low on memory and upgrading is not a feasible choice right now. What I want to do is ...
20
votes
3answers
2k views

How can I set the processor affinity of a process on Linux?

The question is all in the title: How can I set the processor affinity of a process on Linux?
18
votes
2answers
18k views

Limit process to one cpu core

How to limit process to one cpu core ? Something similar to ulimit or cpulimit would be nice. (Just to ensure: I do NOT want to limit percentage usage or time of execution. I want to force app (with ...
18
votes
6answers
1k views

Is there a way to limit overall CPU consumption?

My laptop (an HP with an i3 chip) overheats like crazy every time I run a resource heavy process (like a large compilation, extracting large tarballs or ... playing Flash). I am currently looking ...
13
votes
2answers
724 views

Is it possible to limit how much CPU power a process can take?

I'm wondering, is there way to tell a process how much processor power it can take? The problem is I'm converting video with Arista (video converter) and I'm annoyed by the fan running like crazy, ...
12
votes
3answers
8k views

How to check that AES-NI is supported by my CPU?

Howcan I check if my CPU supports the AES-NI instruction set under Linux/UNIX.
12
votes
3answers
2k views

How can I have 400% CPU occupied on 2 cores

I understand that Σ(%CPU) ≤ logicalcores*(1+ε) (where ε is measure and rounding error). But, how can I have on a 2 core system 2 different processes, each taking 200% of CPU (as measured by htop)? ...
10
votes
3answers
3k views

How can I receive top-like CPU statistics from the shell?

I'm trying to get an accurate read of my used CPU (in percent) from top. This is the command I'm running for testing: top -n1 | awk '/Cpu\(s\):/ {print $2}' This returns: 10.7%us, Which is the ...
10
votes
1answer
7k views

What are software and hardware interrupts, and how are they processed?

I am not sure if I understand the concept of hardware and software interrupts. If I understand correctly, the purpose of a hardware interrupt is to get some attention of the CPU, part of implementing ...
10
votes
1answer
1k views

How can I monitor CPU usage by user?

I need to monitor CPU usage by users of two servers' (Ubuntu and CentOS). For example: user1 5% user2 10% ... Is there a tool similar to top or htop that can do that?
9
votes
4answers
10k views

Why is kworker consuming so many resources on Linux 3.0.0-12-server?

Last Friday I upgraded my Ubuntu server to 11.10, which now runs with a 3.0.0-12-server kernel. Since then the overall performance has dropped dramatically. Before the upgrade the system load was ...
8
votes
4answers
3k views

32-bit, 64-bit CPU op-mode on Linux

I'm confused. Running Fedora Linux, lscpu yields: Architecture: i686 CPU op-mode(s): 32-bit, 64-bit ... But when I try to install a 64-bit program (Chrome) I get error like: ...
8
votes
2answers
9k views

Top and ps not showing the same cpu result

This is linked to this question. When I run top I get the following result: pid 3038 is using 18% cpu, however when running the result is 5.5%. And this number does not appear to be changing ...
8
votes
2answers
7k views

Run process with higher priority

I want to run mplayer with higher priority than any other processes, including the IO-processes. How can I do that?
8
votes
3answers
3k views

Understanding top and load average

I'm observing a high load average on a certain machine (about 9) in all three load fields. I understand load as the number of processes in state "run" / currently desiring CPU time. Am I correct at ...
8
votes
1answer
175 views

What does a computer actually do with its spare CPU cycles?

When a computer is not running at full load, in the context of Linux, what does it actually do? Between scheduled threads, if there is nothing to do, does it spin wait? Does it enter some sleep state? ...
8
votes
1answer
3k views

Isolating cause of higher CPU usage on RHEL 6 vs RHEL 5

I'm currently looking to move our system from RHEL 5 to RHEL 6, but I've run into a snag with unexpectedly high CPU usage on the RHEL 6 machines. It appears that this may be due at least in some part ...
8
votes
2answers
1k views

lshw and lscpu disagree on caches - which is right?

I am trying to find out specifics about caches (in particular which caches are shared between cores and which are not) and have stumpled onto a inconsistency. sudo lshw says *-cache:0 ...
7
votes
7answers
2k views

cron Vs. sleep - which is the better one in terms of efficient cpu/memory utilization?

The Case: I need to run some commands/script at certain intervals of time and for this I have two options - 1. set up a cron-job or, 2. implement a loop with sleep in the script itself. Question: ...
7
votes
2answers
465 views

Overheating results in system shutdown

I have been having an overheating issue which makes my laptop shutdown immediately. Is there anyway to monitor the temperature from the sensor and scale down the CPU frequency to avoid that problem? ...
7
votes
6answers
6k views

Getting cpu usage same every time.

When I execute following command to get cpu usage , I get nice + user cpu usage. top -b -n1 | grep "Cpu(s)" | awk '{print $2 + $4}' Output: 14.5 Here I am getting problem is that the output ...
7
votes
1answer
2k views

Is the sum of all PIDs “utime” the total system utime?

In order to measure a user's total CPU time, I'm using the "utime" field out of /proc/[pid]/stat: utime %lu Amount of time that this process has been scheduled in user mode, measured in ...
7
votes
1answer
481 views

Can I run multiple cores at different clock speeds?

I see the cores on an Intel i5 machine I'm looking at can only be run at the same clockspeed: /sys/devices/system/cpu/cpu1/cpufreq/related_cpus lists all of the CPUs. Setting cpu1's clockspeed changes ...
6
votes
2answers
1k views

How does load average work with modern CPU's?

My understanding of load average lead me to be quite shocked with my current system. The CPU in my workstation is an i7 with hyperthreading enabled, and cat /proc/cpuinfo produces 4 'cpu's. That all ...
6
votes
2answers
197 views

How can I chase a program who is rising up my laptop's temperature?

After 40 days of non-upgrading I came back from a trip and I decided to dist-upgrade my Debian Sid box. Everything went fine but after rebooting I noticed that the temperature was 15°C over its ...
6
votes
2answers
6k views

How can I know which IRQ is responsible of high CPU usage

I've moved a server from one mainboard to another due a disk controller failure. Since then I've noticed that constantly a 25% of one of the cores goes always to IRQ however I haven't managed myself ...
6
votes
2answers
939 views

Java problem - nearly looks like a virus?

I have a weird problem since about a week. When I wake up my computer from suspend, a java process starts and consumes about 170 % CPU capacity. I analyzed the java process a bit: it connects to ...
6
votes
3answers
740 views

How enable safeguards for CPU temperature

My desktop has a nasty habit. When I have several high intensity applications running and my CPU is at maximum usage for a period of time, the core temperature rises and my computer auto-shuts off. ...
6
votes
1answer
112 views

Do processes in cgroups have to be set every boot? If so, how to persist them?

I was reading this answer to a question on setting limits for processes by using cgroups. The sample given sets limits for a process (in the example, sshd). In the answer, the PID of the process is ...
6
votes
2answers
3k views

Get CPU utilization stats from C program

I want to read the CPU utilization stats from a C program, I am interested in the percentage of use of CPU, steal time etc. These stats are shown in the 3rd row from the top command. I tried to parse ...
6
votes
1answer
96 views

KVM reports strange CPU usage peaks (bash infinite recursion)

On a KVM machine running Fedora 20 I ran ulimit -s unlimited (this removes limit on stack size) and an experimental torturing testing script. All this script does is just infinite recursion: ...
5
votes
3answers
396 views

Determining the particular processor on which a process is running

I have access to an 8-core node of a Linux cluster. When logged in to the node, I can see a list of processors using this command: more /proc/cpuinfo In my 8-core node, the processors are numbered ...
5
votes
2answers
4k views

So what are logical cpu cores (as opposed to physical cpu cores)?

I was googling about how I could find the number of CPUs in a machine and I found some posts but I am confused as some mentioned that you get the logical cores vs physical cores etc. So what is the ...
5
votes
2answers
308 views

Why do I have four CPUs listed in /proc/cpuinfo?

When I bought my Lenovo Thinkpad 520, it had Windows installed. I promptly cleaned that out and installed Fedora 16. I recently visited the /proc/cpuinfo and, much to my surprise, discovered that it ...
5
votes
2answers
537 views

Does linux kill heavy and long running background processes after they reach some threshold?

If I start a really heavy (memory/cpu intensive) running really long running process will the OS terminate it after a period of time arbitrarily? I.e. are there any limits beyond which the OS would ...
5
votes
1answer
60 views

Whats the history behind the fork bomb?

I read other question about its work and other things that Fork bombs operate both by consuming CPU time in the process of forking, and by saturating the operating system's process table. A basic ...
5
votes
1answer
560 views

How to find out how many cores (including emulated via HT and such) are avaliable to user?

I wonder how to get how many cores (including emulated via HT and such) are avaliable to user via bash shell-script command?
5
votes
1answer
65 views

How the network packets are transferred to the memory on linux?

Is there some command or tool for monitoring network packets and how those packets are handled by the memory and than proceeded to the CPU on linux platform? Using tcpdump I can capture many apache ...
5
votes
2answers
3k views

Slow down the CPU

I tried to slow down my CPU with powernowd and cpufreq-selector. I hoped that with lower frequency it will be less hot and I won't hear my fan every time I will run internet radio. I used the ...
5
votes
2answers
193 views

Externaly limiting number of CPU cores used

I need to externally limit a process/session to a certain number of cores. Are there any other possibilities than CPU affinity (I don't like the need to specify the actual cores) and cgroups (hard to ...
5
votes
1answer
183 views

How to monitor top applications using CPU (and IO if possible) in a graph?

I need to find what and when these applications used so much CPU (and IO if possible too). This should be in a graphic timeline like we see in GNOME System Monitor CPU History. I also want to compare ...
5
votes
2answers
2k views

VirtualBox guest: 16 CPUs detected but only 1 online

I am running VirtualBox (using the Qiime image http://qiime.org/install/virtual_box.html) The physical hardware is a 32 core machine. The virtual machine in VirtualBox has been given 16 cores. When ...
5
votes
1answer
3k views

Setting CPU frequency guidelines

I'm changing my CPU frequency because of noisy fan. I used sudo cpufreq-selector -g powersave for this purpose, but I replaced my Linux system Xubuntu with Lubuntu because it utilizes better ...
5
votes
1answer
340 views

Loading speedstep_centrino kernel module

Because of a noisy fan in my laptop, I need to change CPU frequency and for this task I need to load the appropriate kernel module. The CPU in my laptop Acer TravelMate 4002WLMi is: $ cat ...
4
votes
4answers
576 views

Limiting processes to not exceed more than 10% of CPU usage

I operate a Linux system which has a lot of users but sometimes an abuse occurs; where a user might run a single process that uses up more than 80% of the CPU/Memory. So is there a way to prevent ...
4
votes
3answers
2k views

How come I installed Ubuntu 64 bit on a Pentium 4 machine?

I have just tried booting the Ubuntu 10.10 64 bit live USB on this machine and to my amazement everything works fine. I even installed the system, after which I checked with uname -a and the result is ...
4
votes
5answers
416 views

performance monitoring

Is there some performace monitoring tool which would run in background gathering info about all system activity? Somethimes my system (Arch linux, 32 bit) slows down terribly and the top utility ...