Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce random disk seeks during write transactions #1470

Closed
danielmewes opened this issue Sep 21, 2013 · 3 comments
Closed

Reduce random disk seeks during write transactions #1470

danielmewes opened this issue Sep 21, 2013 · 3 comments
Assignees
Milestone

Comments

@danielmewes
Copy link
Member

This can be part of a solution to #1080.

Currently, each write transaction causes the following sequence of disk writes:

  • at least one data block write
  • at least one LBA block write
  • a metablock write

The first two have to complete before the metablock can be written. It would be nice if we could do one of these two things to speed up the process:

  1. Reduce the number of different blocks that need to be written
  2. Optimize how these blocks are written to reduce random seeks on rotational drives

2 can be complicated. I favour the following proposal made by @srh to tackle 1:

In a hard-durability setting, we usually change only a very small number of LBA entries. We could allocate a fixed-size area in the metablock to store these recent LBA changes, instead of writing them into a block of their own. Only when the area gets full, we flush those changes out to a specialized LBA block in the LBA extent. This would eliminate step 2 for the majority of transactions.

@danielmewes
Copy link
Member Author

This is implemented in branch daniel_inline_lba . I'm doing some additional testing now.

I've increased the size of the metablock back to 4 KB so it can contain a higher number of inlined LBA entries. Writing 4 KB instead of 512 bytes should make virtually no difference performance-wise. Is anyone aware of negative side-effects that I'm forgetting?

@danielmewes
Copy link
Member Author

This is now in review 973.

@danielmewes
Copy link
Member Author

LBA inlining is in next as of 26ac2d3

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

No branches or pull requests

1 participant