Closed BlackDuck888 closed 8 years ago
+1 For a super detailed issue.
Thank you, Skunk is a nice coach in this.
This is the shard reaper that runs on interval to remove incomplete or expired contracts and their associated shards.
It likely needs to be run as a separate process and have some throttling mechanism in place.
I did not calculate it down to the smallest detail, but it looks like that all shards with its complete content are reread at a restart. The reaper should read the metadata and remove incomplete or expired, but a reread of full content is to much. After my test i only lost some mb most of the gb were obtained.
We must be reading though all keys, not just .info keys. Will issue a fix with 1.0.0.
Okay, the 1.0.0 PR now tries to mitigate this by doing two things:
peek
method to the adapter used in place of get
).
Package Versions
Replace the values below using the output from
npm list storj
.Replace the values below using the output from
node --version
.Expected Behavior
I expect that the system is responsive after a short periode after the farmer starts.
Actual Behavior
It looks like, thats the full farmer.db is reread/rewritten after the farmer start/restart. On my system this process takes up to 20 Minutes @ ~44GB Shards. For dedicated servers this problen is secundary, but for users who run Windows and have to use there Computer for "normal" things this could be a Problem. If there 500GB Shards on disk, and a reboot is caused/forced by Windows Update, the system will need 3h to be useable.
I attach the dstat.csv.txt, in this file you see the start and the high i/o over time.
An a Screenshot from Diskusage.
Steps to Reproduce
Please include the steps the reproduce the issue, numbered below. Include as much detail as possible.