Changing the Priority of InterBase in NT

Abstract: Changing the Priority of InterBase in NT

Problem: Is it possible to change the priority of InterBase in NT so that it performs faster? Solution: The information in this article applies to: * InterBase 4.x * InterBase 5.x It is possible to change the priority of an InterBase-initiated thread, but the current design doesn't make good use of it. Some background.. It is possible to change the priority of the main thread (which is not necessarily a good thing .. see below) but not of the worker threads (which would be a good thing). There is a registry setting at: Classic architecture (pre-version 4.2) HKEY_LOCAL_MACHINESOFTWAREBorlandInterBase CurrentVersionDefaultMode SuperServer architecture (4.2 & up) HKEY_LOCAL_MACHINESOFTWAREInterBase CorpInterBase CurrentVersionDefaultMode which tells the IBREMOTE process to launch the individual processes at a high (-b) or normal (-r) priority. This setting in the registry tells the InterBase service its startup priority with respect to the other services currently running on the machine. Alternatively, there is the Windows API SetThreadPriority() call which has to be done after program execution. It can be passed various levels of priority. And then there's the START command where you can load an executable with a certain priority class (for example, C:> START /LOW CALC.EXE). Simple testing shows that changing the thread/class priotiry has little affect on the performance of InterBase. No matter what which priority the server is started with, the process priority is always NORMAL. It seems as if the server always starts with a normal priority unless the priority is changed in the ibconfig file (SERVER_PRIORITY_CLASS). Changing the priority in the configuration file, however, is not recommended in most cases. This will increase the priority of the listener threads and not the worker threads. If the priority is increased, you may notice that the server accepts connections faster but the overall performance of the server didn't change (or got slower if there are lots of connections coming in).