Hacker News new | ask | show | jobs
by da_n 4644 days ago
Thanks for your detailed reply. It pretty much mirrors things I've heard elsewhere, it seems file sync is one issue in particular which can be slow and prone to errors, it is a shame as an all in one solution would be great.

Funnily enough I have both Baikal and BitTorrent Sync running on a Raspberry Pi (model B/512) and it is handling it surprisingly well, I even use it as a destination backup server for some VPS's and local computers (using duplicity). I just wish the Pi had more RAM as BTSync is a bit of a memory (and CPU) hog when you start to hae a lot of files involved, it is under strain. My compromise has been to tar a lot of folders I rarely access to cut down the number of individual files it needs to track, not ideal. I was thinking of buying one of the Intel Next Unit of Computing I think it is called, which is more powerful but still power effecient enough to be left on 24/7.

1 comments

A question re: BTSync/RPi - I've got around 40-50 gigs synced up between my x86-64 computers (might be on the order of fifty thousand plus files) and the maximum memory it occupies is around 60-70 megs. It idles at 42MB. Since you already have the set up that I am looking into, I think you're the right person to ask, can the RPi handle that much? If not, what are the signs of it slowing down? If it helps, my hypothetical RPi would be connected via wires instead of USB-Wifi dongle.
Looking at it, I have about 10k files and it is only using about 12% memory, perhaps not as bad as I thought. 50k should be absolutely fine I would think. Here is the output of top showing btsync at idle:

    PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND
    2993 btsync    19  -1  122m  60m 2988 S  11.9 12.4 610:05.84 btsync
I have noticed that the CPU takes a beating during any sync operations, tends to grab 100%. I limit the CPU for the btsync process to 60% max and also overclocked the Pi up one level (after installing a heatsink kit). Here it is during typical filesync operations:

    PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND
    2993 btsync    19  -1  122m  60m 2988 S  63.8 12.4 612:51.33 btsync
To limit the cpu I use cpulimit and put this in my /etc/rc.local

    /usr/bin/cpulimit -e btsync -l 60 -b >> /dev/null
Sweet. I guess I'll be ordering one after all. And thanks for the cpulimit code as well. I had no idea you could do such a thing at all.