Adriano dos Santos Fernandes 5f797f0190 Feature #8869 - USING statement 4 天之前
..
license c4143b413b Replaced various old and/or HTTP URLs in documentation and installers 6 月之前
sql.extensions 16a7f49e7f Correction 1 月之前
Firebird_conf.txt 5c57dcd47e Remove obsolete/unmaintained ports (#8788) 3 月之前
README.DiskSpaceAllocation 1b83fbc2c8 A bit better wording. 18 年之前
README.IPv6 64fa369e3d misc: fix spelling (#8575) 8 月之前
README.NTSecurity df59a7a41a misc 18 年之前
README.Optimizer.txt 854da4e241 Misc. 21 年之前
README.SecureRemotePassword.html 77d6529b6c Doc cleanup 7 年之前
README.Win32LibraryInstallation.txt 6a47a28ba0 More Win32 1.5 -> HEAD synchronisation. Updated documentation regarding gds32.dll and instclient.exe 22 年之前
README.build.macosx.md b31d37b787 MacOS: build libicu and static libc++ using vcpkg. 2 年之前
README.build.mingw.html f2b24d02ca Misc. 12 年之前
README.build.msvc.html ee088c22e3 Rework messages processing, simplifying the build and avoiding store generated files in git. (#6958) 4 年之前
README.build.posix.html 5c57dcd47e Remove obsolete/unmaintained ports (#8788) 3 月之前
README.coding.style 4ca32b84ec An additional related to previous commit 22 年之前
README.connection_string_charset.txt 7a110f4be0 CORE-2929 - 'Invalid ESCAPE sequence' when connecting to the database 15 年之前
README.connection_strings 5df7d8f197 Introduce ODS 14 for v6 (#8208) 1 年之前
README.external_routines.txt 64fa369e3d misc: fix spelling (#8575) 8 月之前
README.fb_cancel_operation 0b2a994c27 Misc 16 年之前
README.fb_shutdown 618dbbde26 misc: fix spelling (#8496) 10 月之前
README.fbsvcmgr ee5a856d4a misc: fix spelling (#8578) 8 月之前
README.garbage_collector 902671a044 Misc. 20 年之前
README.gbak 4d22040f90 Fixed docs according to Adriano comments. 3 年之前
README.incompatibilities.3to4.txt 44660f8680 Add section about sequences to README.incompatibilities.3to4.txt (CORE-6084 and CORE-6376). 5 年之前
README.incompatibilities.txt f0c402b780 Fix spelling (#8476) 10 月之前
README.instsvc 08503e2be8 Update documentation for instsvc 18 年之前
README.intl b68d1dfc0c Misc. 14 年之前
README.isc_dpb_xxx 7a7698faf4 Moved non-SQL readmes out of sql.extensions 5 月之前
README.isc_info_xxx 7a7698faf4 Moved non-SQL readmes out of sql.extensions 5 月之前
README.isql_enhancements.txt 3f188ec758 Fix #8409 - Error message "SQL -104 / Unexpected end of command" appears in a trace log when 'SET AUTOTERM ON;' is used. 1 年之前
README.makefiles e0662447cf misc: fix spelling (#8495) 10 月之前
README.modern_cpp.md 9266b5e678 Switch to C++20 (#8657) 6 月之前
README.monitoring_tables e0662447cf misc: fix spelling (#8495) 10 月之前
README.online_validation cc33027282 Misc. 10 年之前
README.parallel_features 5afe69d4f0 misc: fix spelling (#8577) 8 月之前
README.performance_monitoring 59b235cea3 Small corrections 22 年之前
README.plugins.html 5df7d8f197 Introduce ODS 14 for v6 (#8208) 1 年之前
README.providers.html 5df7d8f197 Introduce ODS 14 for v6 (#8208) 1 年之前
README.raw_devices b3c33aeeb6 Renamed aliases.conf to databases.conf as suggested by Dmitry 13 年之前
README.read_consistency.md 6217a01583 Update documentation. 5 年之前
README.read_password_from_file 010c3a8bd5 Remove QLI. (#6840) 4 年之前
README.replication.md cea9f33e96 Feature #1113 - Add support for SQL Schemas. 10 月之前
README.security_database.txt 875f0a25a3 New release version in scripts 2 年之前
README.services_extension 3e1a02599d Better plugins description 5 月之前
README.session_idle_timeouts 5afe69d4f0 misc: fix spelling (#8577) 8 月之前
README.sha1 a749151080 Correct some files to refer to FB2 and security2.fdb 21 年之前
README.statement_timeouts 5afe69d4f0 misc: fix spelling (#8577) 8 月之前
README.superclassic cec668d7fd Misc. 17 年之前
README.trace_services 2bf350245e Fix trace docs still using parts of FB 2.5 syntax 1 月之前
README.transaction_at_snapshot.md cfbcbeda3c Make it possible to start multiple transactions using the same initial transaction snapshot - CORE-6018 (#193) 7 年之前
README.trusted_authentication abde3b2cad Misc. 10 年之前
README.user.embedded c3c18f0978 Misc. 15 年之前
README.user.troubleshooting c4143b413b Replaced various old and/or HTTP URLs in documentation and installers 6 月之前
README.using_statement.md 5f797f0190 Feature #8869 - USING statement 4 天之前
README.wire.compression.html c4143b413b Replaced various old and/or HTTP URLs in documentation and installers 6 月之前
README.xnet c5c49d5e5e Added description of XNET. 20 年之前
Using_OO_API.md 62a2a1511c Per pagespace I/O statistics and new trace API interfaces to allow extendable statistics (#8808) 1 月之前
ambiguity.txt 89af0c2a66 Little corrections. 21 年之前
install_windows_manually.txt 9f2b20df1e remove version mention, split database init to seperate doc 5 年之前
ods11-index-structure.html 4569af61eb ODS11 index structure description 21 年之前

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,