3

I use my raspberry (raspian) as a backup machine. For syncing files to the sd card I use offlineimap, vdirsyncer and others (-> a lot of files are written). The backup itself is done by rsnapshot. The backup target is a 64 gb usb flash drive.

Since I also backup maildir folders (managed by offlineimap) I notice that the mount.ntfs-process is getting slow and eats up a lot of memory. The usage is increasing over several days and sometimes it's falling down very fast. output of picontrol The current outpot of top shows this:

pi@raspberrypi:~ $ top
top - 21:06:15 up 7 days, 23:06,  1 user,  load average: 1.91, 1.50, 0.86
Tasks: 140 total,   1 running, 139 sleeping,   0 stopped,   0 zombie
%Cpu(s):  7.8 us,  6.1 sy,  0.0 ni, 74.4 id, 11.7 wa,  0.0 hi,  0.1 si,  0.0 st
KiB Mem:    996452 total,   968956 used,    27496 free,   419484 buffers
KiB Swap:   102396 total,    79640 used,    22756 free.    44644 cached Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
 1313 root      20   0  422904 419996   1408 D  50.9 42.1 992:38.16 mount.ntfs
 1094 root      20   0       0      0      0 D   1.3  0.0  37:07.14 usb-storage

I chose NTFS because of two requirements:

  • must be easy readable on windows (it's a backup flash drive)
  • has to support hard links (used by rsnapshot)

My questions are

  • Is the consume of memory normal or something to take care?
  • is my setup (backup on usb flash drive via rsnapshot, ntfs) meaningful?

I use this mount command in /etc/fstab

UUID=7C8CB4418CB3F3AC   /mnt/usbstick   ntfs    utf8,uid=pi,gid=pi,noatime 0

Thanks in advance

1
  • I remember reading about this issue a while ago in a forum post when I experienced it. Apparently, cron runs rsnapshot on some pre-determined schedule (I think once a day?) and that will cause CPU utilization to spike (sometimes to 100%, but that's only the case if you're using a faulty driver). Run sudo lsof <path-to-your-NTFS-mount> to find the process causing the spike (some cron-scheduled database update?). Then, remove that script from the cron schedule (or remove rsnapshot from the cron schedule). May 28, 2017 at 4:13

2 Answers 2

2

Changed filesystem to ext4. Rsnapshot runs much faster (seconds for copy with hardlinks instead of minutes). Memory consumption isn't rising any more. NTFS seems to be no good decision on drive with a lot of file access.

1
  • Please accept your answer to mark the problem as solved Mar 30, 2020 at 20:07
2

Raspbian uses an ancient version of libfuse, which doesn't enable many of the performance features unless you ask. Specifically for NTFS, there's big_writes which was deprecated in 2016 but apparently is still in effect on Buster:

sudo mount -o big_writes /dev/sda /media/hdd

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.