I disabled APM, which was lowering performances.
Also, i bought another hd, so i have 1hd for 2 cameras.
Hi all, here is my system:
Ubuntu server 17.04, zoneminder v1.30.3
nuc5i7ryh
16GB ram
240GB ssd (for os) + 256GB ssd for backups
1x 4TB usb3 drive
1x 1TB usb3 drive
remote web access on different port than 80, 8080 and other common ports, nat to local port 80
4pc 1280x720 ip cameras (3 of them are on modect with 2-3 small zones, all events stored on 1TB drive)
2pc 1920x1080 ip cameras (all of them are on modect with 4-5 small zones, all events stored on 4TB drive)
All cameras are 15fps and 150 frame buffer, which is enough for 10s of video.
everything works fine with ffmpeg, i have mapped 80% of ram to shm.
Average load is 2.5-3.5, cpu utilization is near 50% for core, ram usage is 5.31/15GB
Code: Select all
marco@ubuntu-NUC:~$ df -h
File system Dim. Usati Dispon. Uso% Montato su
udev 7,8G 0 7,8G 0% /dev
tmpfs 1,6G 26M 1,6G 2% /run
/dev/sdb2 219G 67G 141G 33% /
tmpfs 13G 4,4G 8,1G 36% /dev/shm
tmpfs 5,0M 0 5,0M 0% /run/lock
tmpfs 7,8G 0 7,8G 0% /sys/fs/cgroup
/dev/sda1 235G 115G 109G 52% /mnt/BACKUP
/dev/sdc1 917G 788G 84G 91% /mnt/EXT_1T
/dev/sdb1 511M 3,4M 508M 1% /boot/efi
/dev/sdd1 3,6T 1005G 2,5T 29% /mnt/EXT_4T
tmpfs 1,6G 0 1,6G 0% /run/user/1000
Code: Select all
2017-05-09 18:35:10.011023 zmc_m4 1667 WAR Buffer overrun at index 26, image 1022576, slow down capture, speed up analysis or increase ring buffer size zm_monitor.cpp 3094
2017-05-09 16:11:10.090935 zma_m1 14862 WAR Approaching buffer overrun, consider slowing capture, simplifying analysis or increasing ring buffer size zm_monitor.cpp 1324
2017-05-09 16:11:10.022441 zmc_m2 1643 WAR Buffer overrun at index 1, image 896701, slow down capture, speed up analysis or increase ring buffer size zm_monitor.cpp 3094
2017-05-09 16:11:09.978518 zmc_m1 1638 WAR Buffer overrun at index 149, image 896699, slow down capture, speed up analysis or increase ring buffer size zm_monitor.cpp 3094
2017-05-09 11:12:56.772680 zmc_m4 1667 WAR Buffer overrun at index 93, image 624093, slow down capture, speed up analysis or increase ring buffer size zm_monitor.cpp 3094
2017-05-09 11:12:28.621271 zmc_m2 1643 WAR Buffer overrun at index 127, image 627427, slow down capture, speed up analysis or increase ring buffer size zm_monitor.cpp 3094
2017-05-09 11:12:28.607541 zmc_m4 1667 WAR Buffer overrun at index 127, image 623677, slow down capture, speed up analysis or increase ring buffer size zm_monitor.cpp 3094
2017-05-09 11:12:28.010578 zmc_m2 1643 WAR Buffer overrun at index 118, image 627418, slow down capture, speed up analysis or increase ring buffer size zm_monitor.cpp 3094
2017-05-09 11:12:27.940199 zmc_m4 1667 WAR Buffer overrun at index 117, image 623667, slow down capture, speed up analysis or increase ring buffer size zm_monitor.cpp 3094
2017-05-09 11:07:23.132997 zmc_m4 1667 WAR Buffer overrun at index 111, image 619161, slow down capture, speed up analysis or increase ring buffer size zm_monitor.cpp 3094
2017-05-09 11:07:21.120984 zmc_m4 1667 WAR Buffer overrun at index 81, image 619131, slow down capture, speed up analysis or increase ring buffer size zm_monitor.cpp 3094
2017-05-09 11:07:15.739386 zmc_m2 1643 WAR Buffer overrun at index 76, image 622726, slow down capture, speed up analysis or increase ring buffer size zm_monitor.cpp 3094
2017-05-09 11:07:08.489546 zmc_m4 1667 WAR Buffer overrun at index 44, image 618944, slow down capture, speed up analysis or increase ring buffer size zm_monitor.cpp 3094
2017-05-09 11:07:06.208327 zmc_m4 1667 WAR Buffer overrun at index 11, image 618911, slow down capture, speed up analysis or increase ring buffer size zm_monitor.cpp 3094
2017-05-09 11:07:05.212603 zmc_m4 1667 WAR Buffer overrun at index 146, image 618896, slow down capture, speed up analysis or increase ring buffer size zm_monitor.cpp 3094
2017-05-09 09:21:52.474660 zmaudit 1704 ERR Unable to unlink '1/17/05/08/.123449': No such file or directory zmaudit.pl
2017-05-09 09:04:57.313946 zmc_m4 1667 WAR Buffer overrun at index 87, image 510537, slow down capture, speed up analysis or increase ring buffer size zm_monitor.cpp 3094
2017-05-09 09:04:56.132963 zmc_m3 1654 WAR Buffer overrun at index 71, image 512471, slow down capture, speed up analysis or increase ring buffer size zm_monitor.cpp 3094
2017-05-09 07:10:40.935284 zms 18934 ERR Unable to validate swap image path, disabling buffered playback zm_monitor.cpp 4025
2017-05-09 07:10:40.929785 zms 18934 ERR Can't stat '/tmp/zm': No such file or directory zm_monitor.cpp 3493
2017-05-09 02:51:44.917470 zmaudit 1704 ERR Unable to unlink '3/17/05/08/.121077': No such file or directory zmaudit.pl
2017-05-09 02:36:17.611780 zmdc 1598 WAR 'zma -m 2' has not stopped at 17/05/09 02:36:17. Sending KILL to pid 1728 zmdc.pl
2017-05-09 02:36:09.980452 zmc_m2 1643 WAR Buffer overrun at index 112, image 161962, slow down capture, speed up analysis or increase ring buffer size zm_monitor.cpp 3094
2017-05-09 02:36:09.921646 zmc_m3 1654 WAR Buffer overrun at index 138, image 161988, slow down capture, speed up analysis or increase ring buffer size zm_monitor.cpp 3094
2017-05-08 23:36:35.185278 zma_m4 1725 WAR Waiting for capture daemon zm_monitor.cpp 503
2017-05-08 23:36:34.181516 zma_m4 1725 WAR Waiting for capture daemon zm_monitor.cpp 503
2017-05-08 23:36:33.169403 zma_m4 1725 WAR Waiting for capture daemon
iotop combined hd writes are 25-30MB/s, which is 12-15MB/disk, so they aren't supposed to be the bottleneck.
Code: Select all
root@ubuntu-NUC:/home/marco# iostat -xd 2 5
Linux 4.10.0-20-generic (ubuntu-NUC) 09/05/2017 _x86_64_ (4 CPU)
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
sda 0,00 0,00 0,00 0,00 0,08 0,00 54,81 0,00 0,27 0,27 0,00 0,14 0,00
sdb 0,48 17,71 0,74 56,57 24,22 591,55 21,49 0,07 1,28 0,43 1,30 1,16 6,65
sdc 0,45 64,62 5,06 29,00 25,90 10336,93 608,51 0,13 3,78 58,00 1997,81 18,16 61,84
sdd 0,13 21,29 3,48 34,93 14,92 12916,68 673,26 15,64 407,26 20,73 445,82 6,08 23,34
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
sda 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00
sdb 1,50 101,50 1,00 282,00 16,00 1672,00 11,93 0,33 1,17 0,00 1,17 1,16 32,80
sdc 0,00 0,00 0,50 0,50 2,00 0,00 4,00 0,73 1628,00 1004,00 2252,00 374,00 37,40
sdd 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
sda 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00
sdb 0,00 45,50 0,00 144,50 0,00 878,00 12,15 0,18 1,27 0,00 1,27 1,27 18,40
sdc 0,00 51,50 0,00 0,00 0,00 0,00 0,00 0,25 0,00 0,00 0,00 0,00 25,20
sdd 0,00 21,50 0,00 1,00 0,00 90,00 180,00 0,13 132,00 0,00 132,00 132,00 13,20
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
sda 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00
sdb 0,00 6,50 0,00 61,00 0,00 2138,00 70,10 0,09 1,51 0,00 1,51 0,62 3,80
sdc 0,00 0,00 0,00 1,00 0,00 210,00 420,00 0,83 1080,00 0,00 1080,00 828,00 82,80
sdd 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
sda 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00
sdb 0,00 8,00 0,00 28,50 0,00 188,00 13,19 0,04 1,33 0,00 1,33 1,33 3,80
sdc 0,00 44,00 0,00 52,50 0,00 17216,00 655,85 22,28 424,42 0,00 424,42 7,16 37,60
sdd 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00
Code: Select all
root@ubuntu-NUC:/home/marco# iostat
Linux 4.10.0-20-generic (ubuntu-NUC) 09/05/2017 _x86_64_ (4 CPU)
avg-cpu: %user %nice %system %iowait %steal %idle
47,56 0,00 2,03 15,82 0,00 34,59
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sda 0,00 0,08 0,00 5641 4
sdb 57,34 24,28 591,77 1796681 43788629
sdc 34,06 25,87 10334,90 1914467 764737688
sdd 38,41 14,91 12916,28 1103147 955748728
Ram usage is good, cpu have some resources.
Everything happens when server is unattended
crontab is configured to do every minute:
- check ups status (with nut), this is an shell script which log status on local mysql database when ups is on battery and, eventually, send shutdown command to a nas.
- update my ip on my website (with curl)
because i need to get small folders, i use 60s events, which are also faster and easier to delete.
every frame last 24 hours.
Does anyone have idea about this?
Or, can someone suggest me some tools for detecting bottleneck?