Open firebird-automations opened 8 years ago
Commented by: Sascha Michel (datiscum1)
OK, I have used strace to understand what happens in the two cases.
When i set Value 65535 i see that: open("/DB/KM.fdb", O_RDWR|O_DSYNC|O_CLOEXEC) = 6
When using 65536 i see that: open("/DB/KM.fdb", O_RDWR|O_DSYNC|O_DIRECT|O_CLOEXEC) = -1 EINVAL (Invalid argument)
"O_DIRECT" is the problem, because I use the ZFS file system.
I hope this information is helpful.
I do not understand why the Page Buffer changed the open options. It would be nice not to use the "O_DIRECT" or make it configurable !!
Commented by: @hvlad
Sascha,
it is already configurable - read in firebird.conf description of FileSystemCacheThreshold setting and set its value to a number greater than planned page cache size
Commented by: Sean Leyne (seanleyne)
Vlad,
Setting the value at the firebird.conf level is not always appropriate/convenient if you want to customize how some databases are configured.
So a more nuanced approach is necessary.
Commented by: @hvlad
Sean,
one may change setting at per-database level in fb3.
Commented by: Sascha Michel (datiscum1)
Vlad,
Thanks, now it works !
Submitted by: Sascha Michel (datiscum1)
In the FIle "Firebird-3.0.0_RC2-ReleaseNotes.pdf" i read this:
The maximum number of pages that can be configured for the database cache depends on whether the database is running under 64-bit or 32-bit Firebird: • 64-bit :: 2 31 -1 (2,147,483,647) pages • 32-bit :: 128,000 pages, i.e., unchanged from V.2.5
On a 64-bit system i can't set values greater then 65535 !
Command: root@FB30:/opt/firebird/bin# ./gfix -b 65536 -user sysdba -pa masterkey 127.0.0.1:KM I/O error during "re open() for SYNC/DIRECT" operation for file "/DB/KM.fdb" -Error while trying to open file -Invalid argument
The database becomes unavailable.
When i set: root@FB30:/opt/firebird/bin# ./gfix -b 65535 -user sysdba -pa masterkey 127.0.0.1:KM
All is OK.