# top + cpu load



## graudeejs (Jan 6, 2009)

```
last pid: 26718;  load averages:  1.01,  0.86,  0.47    up 0+00:47:21  02:44:21
34 processes:  2 running, 32 sleeping
[color="Red"][B]CPU: 50.5% user[/B],  0.0% nice,  1.6% system,  0.0% interrupt, 47.8% idle[/color]
Mem: 28M Active, 670M Inact, 163M Wired, 68K Cache, 112M Buf, 1130M Free
Swap: 512M Total, 512M Free

  PID USERNAME      THR PRI NICE   SIZE    RES STATE  C   TIME   WCPU COMMAND
26710 root            1   8    0  1888K   820K wait   0   0:00  0.10% make
26717 root            1  96    0 16620K 15252K RUN    0   0:01  0.00% cc1
26715 root            1   8    0  3432K  1384K wait   0   0:00  0.00% sh
26716 root            1   8    0  1888K   444K wait   1   0:00  0.00% cc
```
is it normal that even when i compile kernel, i've never seen CPU user over 50% on FBSD (don't remember how it was on linux)?


----------



## ale (Jan 6, 2009)

Do you have a dual core CPU?
Try running top -P.
Check also when you are running make buildworld with the -j flag.


----------



## graudeejs (Jan 6, 2009)

i have Intel Pentium 4 HTT enabled
but i think it's about the same even when i have disabled HTT.

and here goes the big question to be or not to be [HTT]

i will reboot and check if disabling HTT changes things


----------



## ale (Jan 6, 2009)

If you disable HTT you should see just one CPU, so you should see ~100%.


----------



## graudeejs (Jan 6, 2009)

yes, you are right.... t.y.

i think i will keep it off, because for most of time my box is running only 1-2 processes, all other are sleeping [do you have comments on that?]


----------



## Djn (Jan 6, 2009)

Keeping it disabled is supposedly the best, yes. The performance boost isn't large, and there's a bit of SMP overhead, so ... not worth it, at least not on a pentium 4.


----------



## ale (Jan 6, 2009)

killasmurf86 said:
			
		

> yes, you are right.... t.y.
> 
> i think i will keep it off, because for most of time my box is running only 1-2 processes, all other are sleeping [do you have comments on that?]


Did you noticed that I've edited my previous [post=7991]post[/post]?
While if you run make kernel and you leave it alone you will reach ~50%, if you run for example make -j4 buildworld you will notice that, as more process are spawned, they will use more CPUS so you could reach ~100%.


----------



## graudeejs (Jan 6, 2009)

yes, i noticed, that you edit post...
i am on WinXP laptop (not mine) atm
meanwhile messing with FreeBSD 

it reached about 97% without -j


----------



## graudeejs (Jan 6, 2009)

I'm also trying to make it more quiet and cooler.
I got nice aibt board, which was easy to overclock +-300Hz with just one click on Windows....

I'm thinking of dropping 3GHz to 2.7GHz
I don't think i will notice difference


----------



## ale (Jan 6, 2009)

killasmurf86 said:
			
		

> yes, i noticed, that you edit post...
> i am on WinXP laptop (not mine) atm
> meanwhile messing with FreeBSD
> 
> it reached about 97% without -j


But now you have HTT disabled.
You should try timing it like `# time make ...`
I have a dual core Athlon 64 and I can see too every cpu getting at most (100/ncores)% busy.


----------



## kamikaze (Jan 6, 2009)

`# sysctl hw.ncpu`

This shows you how many CPUs are detected. This 50% thing only makes sense on a dual core machine.


----------



## graudeejs (Aug 5, 2010)

This is really, really old thread, but I wanted to add link anyway 
http://content.dell.com/us/en/enter...ch-you-need.aspx?dgc=SM&cid=57468&lid=1479422


----------

