Skip to content

Conversation

@sourcejedi
Copy link

fsync() after each segment write is suboptimal :). It means you stop (cpu) processing to wait for the physical disk write. And the default segment size is 5MB. (I noticed bup avoids this issue by writing pack files of 1GB by default :).

Improvements will vary depending disk/cpu speed. (I guess the worst case was when they were evenly matched).

  • Writing 65M on SheevaPlug "NAS" went from 47s to 45s.
  • 920M on desktop HDD (read from SSD) went from 68s to 45s

fsync() after each segment write is suboptimal :).  It means
you stop (cpu) processing to wait for the physical disk write.
And the default segment size is 5MB. (I noticed bup avoids this
issue by writing pack files of 1GB by default :).

Improvements will vary depending disk/cpu speed
(I guess the worst case was when they were evenly matched).

Writing 65M on SheevaPlug "NAS" went from 47s to 45s.
920M on desktop HDD (read from SSD) went from 68s to 45s
TypeError: __init__() got an unexpected keyword argument 'daemon'
@sourcejedi
Copy link
Author

Obviously there's a few lines of code here, but it's not intrusive. I tried to keep it as simple as possible.

It's still slightly clever, but there's no point using python if you're not going to pass a few closures between threads :).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"is"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants