# High CPU Usage From Nowhere



## Deke (Sep 29, 2010)

Hi,

I recently made a change to my ZFS array where I replaced 3x1TB drives with 3x2TB drives. I did each one by one, resilvered etc etc, I've done this before and never had a problem. Array is now online and acting completely normal, zpool status reports no errors of any kind.

Anyway, after the final reboot to do this, my system started having really high CPU usage. As much as 40% per core across all 4 cores of my Intel Q6600. I assumed something had just crashed and was chewing on resources, but I can't find the source of all this usage.

Top output: (I used top -P -CC -H -S)

```
last pid:  6490;  load averages:  1.45,  1.46,  1.39  up 1+09:47:51    16:36:29
262 processes: 6 running, 237 sleeping, 19 waiting

Mem: 749M Active, 1107M Inact, 1384M Wired, 11M Cache, 614M Buf, 2593M Free
Swap: 4096M Total, 4096M Free
CPU 0: 34.3% user, 0.0% nice, 11.3% system, 0.0% interrupt, 81.6% idle
CPU 1: 33.1% user, 0.0% nice, 14.3% system, 0.0% interrupt, 53.6% idle
CPU 2: 30.6% user, 0.0% nice,  9.1% system, 0.0% interrupt, 61.3% idle
CPU 3: 17.4% user, 0.0% nice, 11.4% system, 0.0% interrupt, 71.2% idle
  PID USERNAME   PRI NICE   SIZE    RES STATE   C   TIME   WCPU COMMAND
   11 root       171 ki31     0K    64K CPU0    0  21.7H 74.46% {idle: cpu0}
   11 root       171 ki31     0K    64K CPU3    3  22.8H 73.88% {idle: cpu3}
   11 root       171 ki31     0K    64K RUN     2  21.7H 67.38% {idle: cpu2}
   11 root       171 ki31     0K    64K RUN     1  16.9H 54.39% {idle: cpu1}
 1322 root        47    0   875M 45884K select  3 146:28  2.59% Xorg
 1412 deke        46    0 47016K 10032K select  0  92:31  1.95% gconfd-2
 1390 deke        49    0   119M 37048K select  2  61:46  1.76% {initial thread}
    0 root       -68    0     0K   576K -       0  35:24  1.56% {em0 taskq}
99351 root        51    0 37660K  9824K select  3   1:23  0.20% smbd
 1399 deke        44    0  8084K  2732K select  0  34:59  0.10% dbus-daemon
 1390 deke        76    0   119M 37048K piperd  0   9:41  0.10% {gnome-session}
   38 root        -8    -     0K   156K zio->i  2  59:55  0.00% {txg_thread_enter}
    0 root       -16    0     0K   576K -       0  42:27  0.00% {spa_zio_5}
    0 root       -16    0     0K   576K -       0  42:26  0.00% {spa_zio_2}
    0 root       -16    0     0K   576K -       0  42:26  0.00% {spa_zio_3}
    0 root       -16    0     0K   576K -       0  42:26  0.00% {spa_zio_7}
    0 root       -16    0     0K   576K -       1  42:26  0.00% {spa_zio_0}
    0 root       -16    0     0K   576K -       1  42:25  0.00% {spa_zio_6}
```

All lines below that are 0%.

Obviously the usage on the cpu lines and usage from the individual processes doesn't add up. Where is it all going???

-Deke


----------



## jb_fvwm2 (Sep 29, 2010)

What drives are those? ( Should/can you 
disable/enable TLER on them? Search the
forum for that term... see if any fixes
match the model of the new drives).


----------



## Deke (Sep 29, 2010)

I found the CPU usage.

It was compiz.

Had been working fine for _months_, randomly broke after that reboot. If I turn it off, cpu usage goes back to normal. DRI/DRI2 and GLX are still working as intended according to X, so god-knows whats going on. I'll do a ports update when I have time and see if it comes good.


----------



## shitson (Sep 30, 2010)

Just as a future note, this is where something like dTrace would of come in very handy...

dtrace(1)


----------

