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

Use fast file grow on those Linux systems which supports it [CORE4443] #4763

Closed
firebird-automations opened this issue May 29, 2014 · 10 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @hvlad

Is related to CORE1469
Is related to CORE1479
Block progress on CORE4445

Votes: 1

Commits: 02e8987 3294d60 FirebirdSQL/fbt-repository@e380a99 FirebirdSQL/fbt-repository@e7abad8

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

Link: This issue is related to CORE1469 [ CORE1469 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

Link: This issue is related to CORE1479 [ CORE1479 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

assignee: Vlad Khorsun [ hvlad ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

Link: This issue block progress on CORE4445 [ CORE4445 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

Fix Version: 2.5.3 [ 10461 ]

Fix Version: 3.0 Beta 1 [ 10332 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: Sean Leyne (seanleyne)

Vlad,

Some details for this case are really appropriate.

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

In short: added ability to use fallocate()

No so short:
Firebird used pre-allocation of disk space when it decides to extend database file.
It could be done in a few ways
a) write zero's at the end of file page by page (very slow)
b) write zero's at the end of file using relatively big chunk (faster)
c) use OS\FS services to reserve space for a given file (fastest)

On Windows we already using (c) : SetEndOfFile does what we need. But on Posix there was no
such system call at that time, so (b) was used.

Now fallocate() is supported by most Linux cores and file systems (yes, it requres explicit support
by file system). Therefore we implemented ability to use fallocate() and handle case when call is not
supported by file system (in this case (b) will be used as before).

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: Cannot be tested

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

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

2 participants