Dmitry Yemanov 33b5bbee06 Updated the docs 6 ani în urmă
..
license 0f7aa4d392 Corrected the license URLs. 15 ani în urmă
sql.extensions d1bff87522 Addition for CORE-6043 : GTTs do not release used space 6 ani în urmă
Firebird_conf.txt 4e040037e7 Fixed the docs. 19 ani în urmă
README.DiskSpaceAllocation 1b83fbc2c8 A bit better wording. 18 ani în urmă
README.NTSecurity df59a7a41a misc 18 ani în urmă
README.Optimizer.txt 854da4e241 Misc. 21 ani în urmă
README.UserSql e595d2e482 Make it better understandable to people - thanks to Claudio 15 ani în urmă
README.Win32LibraryInstallation.txt 6a47a28ba0 More Win32 1.5 -> HEAD synchronisation. Updated documentation regarding gds32.dll and instclient.exe 22 ani în urmă
README.Win9X_NT_embedding aca5a83a46 Fixed CORE-2609: Update support for Windows 98/ME and NT4.0 16 ani în urmă
README.build.mingw.html c9ba5d9fb3 Misc 19 ani în urmă
README.build.msvc.html 9a3a71029d Misc 19 ani în urmă
README.build.posix.html 9017640095 This appears to fix CORE-3400: Server crash every 3 hour (FreeBSD8.2R), but I did not get final confirmation from the reporter too long 14 ani în urmă
README.coding.style 4ca32b84ec An additional related to previous commit 22 ani în urmă
README.connection_string_charset.txt 86456e13c7 CORE-2929 - 'Invalid ESCAPE sequence' when connecting to the database 15 ani în urmă
README.fb_cancel_operation 4cdb94d94d Missed part of documentation 16 ani în urmă
README.fb_shutdown 130c32bd93 Misc. 15 ani în urmă
README.fbsvcmgr a14a2159b2 Implemented CORE-2197: added support for -nodbtriggers switch in gbak into services API 17 ani în urmă
README.garbage_collector 902671a044 Misc. 20 ani în urmă
README.incompatibilities.txt 17eb6a72fe Adjust doc. re. --enable-binreloc 17 ani în urmă
README.instsvc 08503e2be8 Update documentation for instsvc 18 ani în urmă
README.intl 197bfff4e5 Added comment describing codepage as suggested by Philippe Makowski 17 ani în urmă
README.isql_enhancements.txt e857b19539 Explain other isql options. 20 ani în urmă
README.makefiles 4a80dfe3a8 Note for POSIX builders 19 ani în urmă
README.monitoring_tables bcebd6f026 Fixed CORE-2478: mon$memory_usage: Incorrect database memory reported on CS and SC. 16 ani în urmă
README.online_validation a55b940583 Misc. 11 ani în urmă
README.performance_monitoring 59b235cea3 Small corrections 22 ani în urmă
README.raw_devices b387c0dd80 misc 18 ani în urmă
README.read_password_from_file a5ff7ca091 Misc 17 ani în urmă
README.services_extension a3ae2fcc6b Feature CORE-4707 : Implement ability to validate tables and indices online 11 ani în urmă
README.sha1 a749151080 Correct some files to refer to FB2 and security2.fdb 21 ani în urmă
README.superclassic cec668d7fd Misc. 17 ani în urmă
README.time_zone_forward_compatibility.md 05ebc0232d Backport CORE-5853 - Forward-compatible expressions LOCALTIME and LOCALTIMESTAMP. 7 ani în urmă
README.trace_services 1c8d5ff38d Misc. 16 ani în urmă
README.trusted_authentication c9202a3767 Misc 17 ani în urmă
README.user f676883248 Misc 19 ani în urmă
README.user.embedded 99d7dacf6a Correction. 15 ani în urmă
README.user.troubleshooting cd010ff939 Misc 17 ani în urmă
README.xnet c5c49d5e5e Added description of XNET. 20 ani în urmă
WhatsNew 33b5bbee06 Updated the docs 6 ani în urmă
ambiguity.txt 89af0c2a66 Little corrections. 21 ani în urmă
cleaning-todo.txt 850c53a3c5 Update to-do a tad. 16 ani în urmă
emacros-cross_ref.html 503cd1e4ae Change document name 22 ani în urmă
fb2-todo.txt 0f7cd8ec8b A couple TODO items I forgot 22 ani în urmă
install_win32.txt 6a47a28ba0 More Win32 1.5 -> HEAD synchronisation. Updated documentation regarding gds32.dll and instclient.exe 22 ani în urmă
install_windows_manually.txt 351b41fba6 Clarify a point 18 ani în urmă
ods11-index-structure.html 4569af61eb ODS11 index structure description 21 ani în urmă

README.DiskSpaceAllocation


Since the beginning, Firebird had no rules of how to allocate disk space
for database file(s). It just writes new allocated pages in not determined
order (because of dependencies between pages to serve "careful write" strategy).

This approach is very simple but has some drawbacks :

- because of not determined order of writes, there may be such situation when
page cache contains many dirty pages at time when new allocated page must be
written but can't because out of disk space. In such cases often all other
dirty pages are lost because administrators prefer to shutdown database
before making some space on disk available. This leads to serious corruptions.

- allocating disk space by relatively small chunks may lead to significant file
fragmentation at file system level and reduce performance of large scans (for
example during backup).


Using new ODS 11.1, Firebird changes its disk space allocation algorithm to
avoid corruptions in out of disk space conditions and to give the file system a
chance to avoid fragmentation. These changes are described below.

a) Every newly allocated page is written on disk immediately before returning to
the engine. If page can't be written then allocation doesn't happen, PIP bit
is not cleared and appropriate IO error is raised. This error can't lead to
corruptions as we have a guarantee that all dirty pages in cache have disk
space allocated and can be written safely.

This change makes one additional write of every newly allocated page compared
with old behavior. So performance penalty is expected during the database file
growth. To reduce this penalty Firebird groups writes of newly allocated pages
up to 128KB at a time and tracks number of "initialized" pages at PIP header.

Note : newly allocated page will be written to disk twice only if this page
is allocated first time. I.e. if page was allocated, freed and allocated again
it will not be written twice on second allocation.

b) To avoid file fragmentation, Firebird used appropriate file system's API to
preallocate disk space by relatively large chunks. Currently such API exists
only in Windows but it was recently added into Linux API and may be implemented
in such popular file system's as ext2, etc in the future. So this feature is
currently implemented only in Windows builds of Firebird and may be implemented
in Linux builds in the future.

For better control of disk space preallocation, new setting in Firebird.conf
was introduced : DatabaseGrowthIncrement. This is upper bound of preallocation
chunk size in bytes. Default value is 128MB. When engine needs more disk space
it allocates 1/16th of already allocated space but no less than 128KB and no more
than DatabaseGrowthIncrement value. If DatabaseGrowthIncrement is set to zero then
preallocation is disabled. Space for database shadow files is not preallocated.
Also preallocation is disabled if "No reserve" option is set for database.

Note : preallocation also allows to avoid corruptions in out of disk space
condition - in such case there is a big chance that database has enough space
preallocated to operate until administrator makes some disk space available.


Author: Vlad Khorsun,