continuous minor bits writing in config/index-v0.14.0.db/*.log


#1

I am using syncthing in my WD MyCloud Gen1 NAS. It seems that there is continuous minor bits writing in config/index-v0.14.0.db/*.log, which forces harddisk to be active every time. I tried to put folder index-v0.14.0.db to ram tmpfs, but the .ldb files are too large to do so. Would there be a optimize to put the config/index-v0.14.0.db/.log into a seperate subfolder so that it can be stored in a small ram tmpfs? Or it could be optimized to keep these countinous few bits in memory instead of write them into log file?


(Jakob Borg) #2

It’s a part of the database, which we don’t really manage independently. There are writes now and then because we keep track of when we last saw peer devices and things like that. So, no, sorry, I don’t think there is a way to avoid writes there.


#3

Thank you for reply. So, these writes is for keeping track the last saw peers info. Could there be a choice that it will not connect peers frequently unless there is file changes? Syncing will not be successful while there are peers can not be connected passively. But we can select this strategy if the peers are not hidden behind a firewall or NAT.


(uok) #4

What are you trying to achieve - sleeping disks? I think it is better if you make a script that pings the other peers and start/stop Syncthing accordingly


#5

Yes, I am trying to sleep disks while there is no data sync. Make a script is a good idea if my notebook has a fixed IP but it’s ok only when I am at home. My proposal is that maybe syncthing can be configured to connect peers on demand so that it won’t always active the disk. If there are file changes at other peers, the refered peer will actively ask for a connection. If the NAS has a fixed IP or DDNS and the listening port is internet reachable, the sync will be successful. All peers will work on demand.


(Jakob Borg) #6

Generally speaking we can’t rely on being able to make a connection in the desired direction, nor on being able to know when another device needs a file.

You could instead argue that we shouldn’t write anything at all to the database when idle. That’s more feasible (but not something most people care about).


#7

Now I ssh to WDMyCloud to start and stop syncthing service manually to avoid that disk be forced active all the time. It seems that my suggestion is not a reliable way for data synchronization. It’s only a compromise when then the continuous bytes writing are totally not avoidable. The network environment needs to carefully configured to make sure connections can be established. This compromise is not necessary since it sounds that not writing the tracking info bytes now and then to database when idle is more feasible. Could you make keeping these bytes in memory or discard them when idle as a configurable option if it can be implemented and the reliability won’t be heavily affected please? not high priority as not something most people care about. Thanks.


(uok) #8

Where does the NAS OS keep its files? I run FreeNAS which boots from USB - maybe you have something similar where you can store your Syncthing DB.


#9

The os system is stored at HD. I’ll try to mount a usb drive to store Syncthing DB later. Yes, it looks like a fast and nice solution. Thank you.