Issue Details (XML | Word | Printable)

Key: CORE-4443
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Vlad Khorsun
Reporter: Vlad Khorsun
Votes: 1
Watchers: 3

If you were logged in you would be able to see more operations.
Firebird Core

Use fast file grow on those Linux systems which supports it

Created: 29/May/14 07:28 AM   Updated: 23/Sep/15 12:19 PM
Component/s: Engine
Affects Version/s: None
Fix Version/s: 2.5.3, 3.0 Beta 1

Issue Links:

QA Status: Cannot be tested

 All   Comments   Change History   Subversion Commits      Sort Order: Descending order - Click to sort in ascending order
Vlad Khorsun added a comment - 12/Jun/14 07:18 AM
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).

Sean Leyne added a comment - 11/Jun/14 02:51 PM

Some details for this case are really appropriate.