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

customize directory for shared memory files (lock table, event table, etc.) [CORE3268] #3636

Closed
firebird-automations opened this issue Dec 1, 2010 · 10 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Holger Klemt (klemmo)

I tested the current Firebird release 2.5 64 on win7 64 bit with great results, but in most cases the hardware
limits the speed, especially the harddisk.

When using a second volume for the database and the temp files, for example a Raid/SAN/Ramdisk,
where the database file is located and also the firebird server is installed, the engine still
uses c:\programdata\Firebird for lock files. There are not so many write operations but it
would for sure help if this directory can be changed whenever needed, similar to the setting
for tmp files.

regarding this issue, I found an old entry here:http://www.firebirdsql.org/index.php?op=devel&sub=engine&id=develff200908
#⁠ Use COMMONAPPDATA folder on Windows for shared memory files placement (lock table, event table, etc).

thanks

Holger

@firebird-automations
Copy link
Collaborator Author

Commented by: Sean Leyne (seanleyne)

Using a single folder/path for these files only works if a single FB instance is installed. There would be problems if multiple instances/versions were installed.

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

This directory must be well-known and fixed to all FB processes running on the machine, otherwise you may get your database corrupted. This makes any per-instance or per-database configuration problematic. But if you insist, use the FIREBIRD_LOCK environment variable to point the engine to the new destination.

@firebird-automations
Copy link
Collaborator Author

Commented by: Holger Klemt (klemmo)

thanks, i was not aware of this existing FIREBIRD_LOCK variable, works fine

Am i right that looking at gds.cpp in Firebird Source code will always help to find similar
variables in the future?

const char* const FB_LOCK_ENV = "FIREBIRD_LOCK";
const char* const FB_MSG_ENV = "FIREBIRD_MSG";
const char* const FB_TMP_ENV = "FIREBIRD_TMP";

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

Basically yes, although I cannot promise it won't be moved elsewhere due to some refactoring :-)

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

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

resolution: Won't Fix [ 2 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: Sean Leyne (seanleyne)

Dmitry, why "won't fix" it seems like a reasonable request, allowing for the path of related files to be defined/configured on an instance by instance level.

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

Did you read my comments above? How are you going to protect a database accessed by multiple instances configured differently?

@firebird-automations
Copy link
Collaborator Author

Commented by: Sean Leyne (seanleyne)

The fact that something is dangerous to do, does not mean that we should not allow it -- documentation/comments in config file should provide necessary warnings.

IMO, support via environment variable is not appropriate but an instance level configuration setting seems reasonable.

The scenario that Holger has brought forward is entirely valid and should be supported.

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

Undoubtfully, /tmp disk speed matters a lot for the overall performance. But does anyone have a proof that the same is true for files backing the shared memory in Firebird? Why would one need to relocate them? Just because it *looks* useful?

Practice shows that too few people read docs and many of those who do cannot handle all the subsequences. A config option allowing to corrupt a database is a disaster waiting to happen. Sometimes it could be rational even if not recommended (e.g. RemoteFileOpenAbility) but I doubt this case belongs to the same category.

@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

1 participant