Page 1 of 1

"load" and "disk" in console

Posted: Fri Aug 05, 2016 9:49 pm
by alabamatoy
What do these mean? I tried to search for this, but these words are used so much it really didnt find what Im after.

DF shows less than 2% useage of the disk ZM is supposed to writing to, but the zm console shows 7%.

Code: Select all

Filesystem     1K-blocks     Used Available Use% Mounted on
udev             1962848        0   1962848   0% /dev
tmpfs             396432     6264    390168   2% /run
/dev/sda1      134439176  5014884 122572044   4% /
tmpfs            1982148   405196   1576952  21% /dev/shm
tmpfs               5120        4      5116   1% /run/lock
tmpfs            1982148        0   1982148   0% /sys/fs/cgroup
/dev/sdb1      941881932 15232480 878781548   2% /zmdata
tmpfs             396432       28    396404   1% /run/user/108
tmpfs             396432        0    396432   0% /run/user/1000
I have seen load go as high as 5.something....at what point do I need to be concerned?

Re: "load" and "disk" in console

Posted: Sat Aug 06, 2016 10:38 am
by loxodograph
Briefly,

Code: Select all

df -h
gives you information about free space in the filesystem – both real partitions and ramdisks. The optional '-h' gives results in human-readable (sic) units (e.g., GB, MB, etc) rather than blocks.

The significant line in your example is /dev/shm. If ZM fills this ramdisk, it will cause Bad Things to happen. Higher resolution images and higher framerates will increase the use of /dev/shm. 21% Used (your figure) is fine.

The Load given in the ZM console represents the current CPU load. A single-core processor, working a full nominal load, will show a figure of '1,00'. This is multiplied by the number of cores, so a quad-core at full load will report '4,00'.

Another useful terminal command is htop (you will have to install it – it isn't part of the standard Ubuntu/Debian installation). You can immediately see what is taking CPU cycles (and other parameters) and see the effect of reducing, for example, the image resolution and framerate. htop also displays the Load figures (Load average, towards the top right of the terminal display).

Easy overview of Load average: http://www.howtogeek.com/194642/underst ... e-systems/
More about Load in ZM: https://wiki.zoneminder.com/Managing_Load

Re: "load" and "disk" in console

Posted: Tue Aug 09, 2016 6:40 pm
by alabamatoy
loxodograph wrote:The significant line in your example is /dev/shm. If ZM fills this ramdisk, it will cause Bad Things to happen. Higher resolution images and higher framerates will increase the use of /dev/shm.
So if I add a second HDD, would it then be wise ALSO to move /dev/shm to that new separate single-purpose HDD, along with /var/cache/zoneminder/images and same/events ?

Also, thanks much for the insight and links. Very helpful.

Re: "load" and "disk" in console

Posted: Wed Aug 10, 2016 9:10 am
by loxodograph
alabamatoy wrote:... would it then be wise ALSO to move /dev/shm to that new separate single-purpose HDD, along with /var/cache/zoneminder/images and same/events ?
No, it doesn't work like that. /dev/shm isn't a physical partition, it's a ramdisk. This is a portion of RAM configured for use in the same way as a physical disk partition (over-simplification), but with one important advantage over physical disks, both rotating hard drives and SSDs – it is very fast. In ZM, it is the shared memory, to allow processes to pass data between themselves.

In theory, it could be a physical disk partition, but with dire consequences for disk I/O and system performance. Leave it where it is.