Hi,
this works not as intended! If you start the vnstatd before creating the ramdisk it creates filehandles to the files on the disk so the ramdisk is not used at all. How large is the database and how have you created the traffic for the test? All readed files are put to the cache so it might be normal that the cache is fuller after ramdisk mount and copying.
Arne
Am 2020-03-22 14:16, schrieb Matthias Fischer:
Hi,
it seems that I found a (fast) solution for starting/stopping 'vnstatd':
- In '/etc/init.d/vnstat' I changed:
start) if use_ramdisk; then boot_mesg "Mounting vnstat ramdisk..." mount_ramdisk "${VNSTATLOG}" evaluate_retval fi ;;
To:
start) boot_mesg "Starting vnstatd..." loadproc /usr/sbin/vnstatd -d --alwaysadd sleep 2 evaluate_retval
if use_ramdisk; then boot_mesg "Mounting vnstat ramdisk..." mount_ramdisk "${VNSTATLOG}" evaluate_retval fi ;;
- Changed:
stop) umount_ramdisk "${VNSTATLOG}" ;;
To:
stop) boot_mesg "Stopping vnstatd..." killproc /usr/sbin/vnstatd sleep 2 evaluate_retval umount_ramdisk "${VNSTATLOG}" ;;
Tested. Worked.
But this doesn't check whether the old interface files were imported correctly...
Opinions?
Best, Matthias
P.S.: 'cached memory' is now at 90.42%. Used: 4.18% Buffered: 1.39% Free: 4.00% On a 2 GB / 32bit-machine (offline). Hm.