1

I've built a server for CCTV with Zoneminder.

Orwell is a Pentium 4 (Prescott) with Hyperthreading, running Ubuntu Server 12.04 LTS, 2GiB RAM and a 40GB IDE Hard Drive.

All he does is serve live feeds once per second from two cameras.

This is a headless machine, which I connect to occasionally via Putty (SSH) to check the load, which averages between 1.0 and 1.5 - is this a 'normal' load? He seems quite happy to sit there serving camera feeds, so I'm inclined to leave him alone

System information as of Thu Feb 27 13:25:59 GMT 2014

System load: 1.49
Processes: 104
Usage of /: 7.3% of 34.62GB
Users logged in: 0
Memory usage: 11%
IP address for eth0: 192.168.0.99
Swap usage: 0%

Any advice on how I can reduce the number of processes and load as much as possible, since zoneminder is his only purpose?

Thanks in advance for your suggestions :-)

EDIT: I did top -n 1 -b > top-output.txt and here's the resulting output, which doesn't reveal any reason why load is so high:

top - 14:22:37 up 17:27,  1 user,  load average: 0.13, 0.20, 0.22
Tasks: 104 total,   1 running, 103 sleeping,   0 stopped,   0 zombie
Cpu(s):  7.6%us,  0.2%sy,  0.0%ni, 91.9%id,  0.2%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   2030228k total,   728024k used,  1302204k free,   122068k buffers
Swap:  2062332k total,        0k used,  2062332k free,   367552k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 1742 www-data  20   0  169m  51m  42m S   16  2.6  90:19.25 zmc
 3238 www-data  20   0  164m  46m  37m S    4  2.4   2:49.69 nph-zms
 3237 www-data  20   0  139m  21m  14m S    2  1.1   0:14.89 nph-zms
 3828 www-data  20   0  164m  38m  29m S    2  2.0   0:45.17 nph-zms
    1 root      20   0  3672 1976 1244 S    0  0.1   0:01.14 init
    2 root      20   0     0    0    0 S    0  0.0   0:00.00 kthreadd
    3 root      20   0     0    0    0 S    0  0.0   0:05.44 ksoftirqd/0
    5 root       0 -20     0    0    0 S    0  0.0   0:00.00 kworker/0:0H
    7 root      RT   0     0    0    0 S    0  0.0   0:00.01 migration/0
    8 root      20   0     0    0    0 S    0  0.0   0:00.00 rcu_bh
    9 root      20   0     0    0    0 S    0  0.0   0:02.92 rcu_sched
   10 root      RT   0     0    0    0 S    0  0.0   0:00.27 watchdog/0
   11 root      RT   0     0    0    0 S    0  0.0   0:00.22 watchdog/1
   12 root      RT   0     0    0    0 S    0  0.0   0:00.01 migration/1
   13 root      20   0     0    0    0 S    0  0.0   0:33.70 ksoftirqd/1
   14 root      20   0     0    0    0 S    0  0.0   0:00.00 kworker/1:0
   15 root       0 -20     0    0    0 S    0  0.0   0:00.00 kworker/1:0H
   16 root       0 -20     0    0    0 S    0  0.0   0:00.00 khelper
   17 root      20   0     0    0    0 S    0  0.0   0:00.00 kdevtmpfs
   18 root       0 -20     0    0    0 S    0  0.0   0:00.00 netns
   19 root       0 -20     0    0    0 S    0  0.0   0:00.00 writeback
   20 root       0 -20     0    0    0 S    0  0.0   0:00.00 kintegrityd
   21 root       0 -20     0    0    0 S    0  0.0   0:00.00 bioset
   22 root       0 -20     0    0    0 S    0  0.0   0:00.00 kworker/u5:0
   23 root       0 -20     0    0    0 S    0  0.0   0:00.00 kblockd
   24 root       0 -20     0    0    0 S    0  0.0   0:00.00 ata_sff
   25 root      20   0     0    0    0 S    0  0.0   0:00.00 khubd
   26 root       0 -20     0    0    0 S    0  0.0   0:00.00 md
   27 root       0 -20     0    0    0 S    0  0.0   0:00.00 devfreq_wq
   28 root      20   0     0    0    0 S    0  0.0   0:07.11 kworker/0:1
   29 root      20   0     0    0    0 S    0  0.0   0:09.42 kworker/1:1
   30 root      20   0     0    0    0 S    0  0.0   0:00.02 khungtaskd
   31 root      20   0     0    0    0 S    0  0.0   0:00.00 kswapd0
   32 root      25   5     0    0    0 S    0  0.0   0:00.00 ksmd
   33 root      39  19     0    0    0 S    0  0.0   0:00.00 khugepaged
   34 root      20   0     0    0    0 S    0  0.0   0:00.00 fsnotify_mark
   35 root      20   0     0    0    0 S    0  0.0   0:00.00 ecryptfs-kthrea
   36 root       0 -20     0    0    0 S    0  0.0   0:00.00 crypto
   48 root       0 -20     0    0    0 S    0  0.0   0:00.00 kthrotld
   51 root      20   0     0    0    0 S    0  0.0   0:00.00 scsi_eh_0
   52 root      20   0     0    0    0 S    0  0.0   0:00.00 scsi_eh_1
   55 root       0 -20     0    0    0 S    0  0.0   0:00.00 dm_bufio_cache
   75 root       0 -20     0    0    0 S    0  0.0   0:00.00 deferwq
   76 root       0 -20     0    0    0 S    0  0.0   0:00.00 charger_manager
  221 root      20   0     0    0    0 S    0  0.0   0:02.64 jbd2/sda1-8

And the output from

ps -aSHuxk %cpu |tail -n 10

...

rufus@orwell:~$ ps -aHuxk %cpu |tail -n 10
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
www-data  3832  0.1  0.3  35724  7460 ?        S    13:44   0:05 /usr/sbin/apache2 -k start
www-data  3150  0.2  0.4  37252  8968 ?        S    13:13   0:09 /usr/sbin/apache2 -k start
www-data  3216  0.3  1.1 144408 24048 ?        S    13:15   0:13 /usr/bin/zmc -d /dev/video1
www-data  3827  0.3  1.0 142508 22240 ?        S    13:44   0:09 /usr/lib/cgi-bin/nph-zms
www-data  3237  0.3  1.0 142508 22240 ?        S    13:15   0:16 /usr/lib/cgi-bin/nph-zms
root      4129  0.6  0.1  10032  3332 ?        Ss   14:28   0:00 sshd: rufus [priv]
www-data  3828  1.9  2.1 167956 43360 ?        S    13:44   0:52 /usr/lib/cgi-bin/nph-zms
www-data  3238  4.2  2.3 167956 47844 ?        S    13:15   3:03 /usr/lib/cgi-bin/nph-zms
www-data  1742  8.9  2.6 173796 53212 ?        S    Feb26  91:13 /usr/bin/zmc -d /dev/video0
rufus     4261 11.3  0.2   9716  6000 pts/0    Ss   14:28   0:00 -bash
3
  • No, that is not normal, you can use top to see where your load is going..
    – Requist
    Feb 27, 2014 at 13:56
  • I'm familiar with 'top' but not how to output the results so I can post them here.
    – KangaRufus
    Feb 27, 2014 at 14:04
  • I hoped top would show you what was using you cpu power. But to insert the top 10 users in your question: ps -aSHuxk %cpu |tail -n 10
    – Requist
    Feb 27, 2014 at 14:25

1 Answer 1

0

Looking at the data you supplied I would not worry about your load.
You mention in your question a load of 1 to 1.5 which is indeed quite high for a server not doing much.
However in the supplied top you can see the load average of 1, 5 and 15 minutes.

The 15 minute load is 0.22, which is perfectly OK.

I do see in the process tail a much higher temporarily load. So probably the load which you see is not an average but a momentarily load. A momentarily load may peak, it is the average which counts.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .