Subject firebird configuration questions
Author svanderclock
hello,

I have few question reguarding the configuration of firebird on a
dedicated server with windows 2008 xeon With 8 go of memory and
disques SAS in raid 0

about the database :

file size : 2 Go ;
Database page size : 4096
Allocated database pages: 570711
sweep interval: 0 (i do it manually every week)
buffers
Pages: 10240
size: 40960
force writes: true

about the application, the read are very important and very
demanding, the write are not prioritary and not very often.
the database have close to 500 000 SQL queries / days (about 1 to 50
SQL queries every secondes)


ma questions :

1/ in the firewall, i open the port 3050 in TCP or also the port 3050
in UDP ? did i need to do something else in the firewall ?

3/ in windows, on the disk driver, can i activate "enable write
caching on disk" and "enable advanced performance" ? is this
connected also in some way with the option "force writes" of the
database ?

4/ about the Firebird configuration file, what are the good option :

# ----------------------------
# Number of cached database pages
#
# This sets the number of pages from any one database that can be held
# in cache at once. If you increase this value, the engine will
# allocate more pages to the cache for every database. By default, the
# SuperServer allocates 2048 pages for each database and the classic
# allocates 75 pages per client connection per database.
#
# Type: integer
#
#DefaultDbCachePages = 2048

As i have 570711 pages, 2048 seen very little ? can i increase it to
something like 250000 ? or more ?


# ----------------------------
# File system cache usage
#
# Sets the threshold whether Firebird will use file system cache or
not.
# File system caching is used if database cache pages (sets
explicitly in
# database header or implicitly via DefaultDbCachePages setting) is
less
# than MaxFileSystemCache value.
# To always use file system cache set MaxFileSystemCache to some big
value.
# To never use file system cache set MaxFileSystemCache to zero.
#
# Type: integer, measured in database pages
#
#MaxFileSystemCache = 65536

hmm, it's mean that i can have 65536 different file ? is it not to
lot ? what the advantage to not use file system cache ? what else
will be use ?


# ----------------------------
# Temporary space management
#
# Temporary storage is used by the sorting module, it's also
# intended to store temporary datasets etc.
#
# The parameters below handle the allocation and caching policy
# for the temporary space manager. In previous Firebird versions,
# they were prefixed with "SortMem" instead of current "Temp".
#
# The smallest block size being allocated in the temporary storage.
# This value reflects the allocation granularity.
#
# Type: integer
#
#TempBlockSize = 1048576

1 mo seen very low, especially when i do lot of "heavy" sort ! can i
increase it to 512 mb ?


# ----------------------------
# The maximum amount of the temporary space that can be cached
# in memory.
#
# For Classic servers, this setting is defaulted to 8 MB.
# Although it can be increased, the value applies to each client
# connection/server instance and thus consumes a lot of memory.
#
# Type: integer
#
#TempCacheLimit = 67108864

64 mo seem also very low ! can i change it to 2 or 4 GO ? (i have a
server with 8 go of memory)


# TCP/IP buffer size for send and receive buffers of both the client
# and server. The engine reads ahead of the client and can send
# several rows of data in a single packet. The larger the packet size,
# the more data is sent per transfer. Range is 1448 to 32767
(MAX_SSHORT).
#
# Type: integer
#
#TcpRemoteBufferSize = 8192

i don't really know if i must touch this


# ----------------------------
# Locking and shared memory parameters
#
# Bytes of shared memory allocated for lock manager.
# In Classic mode, the size given is used for the initial allocation.
The
# table expands dynamically up to the limit of memory. In
SuperServer, the
# initial size is also the final size.
#
# Type: integer
#
#LockMemSize = 1048576

No idea what the memory need the lock manager. can i say 10 mo ?


# ----------------------------
# Number of semaphores for interprocess communication.
# In non-threading environments, this sets the number of semaphores
# available
#
# Type: integer
#
#LockSemCount = 32

not understant this. i m in superserver


# ----------------------------
# Tune lock hash list; more hash slots mean shorter hash chains. Only
# necessary under very high load. Prime number values are recommended.
#
# Type: integer
#
#LockHashSlots = 1009

also here not understand this.


# ----------------------------
# Bytes of shared memory allocated for event manager.
#
# Type: integer
#
#EventMemSize = 65536

as i don't use the Event, can i move it to 0? how also to deactivate
the event manager ?


# ----------------------------
# Which CPUs should be used (Windows Only)
#
# In an SMP system, sets which processors can be used by the server.
# The value is taken from a bit map in which each bit represents a
CPU.
# Thus, to use only the first processor, the value is 1. To use both
# CPU 1 and CPU 2, the value is 3. To use CPU 2 and CPU 3, the value
# is 6. The default value is 1.
#
# Type: integer
#
#CpuAffinityMask = 1

I have a xeon 4 heart, did i leave this params like this ?


# The wait time, in milli-seconds (ms), before the priority of:
# - an active thread is reduced to 'Low', or
# - an inactive thread is increased to 'High'
#
# Note: The default value was chosen based on experiments on Intel
# PIII/P4 processors. It should be increased for using in the
computer
# with lower speed processors.
#
# Type: integer
#
#PrioritySwitchDelay = 100

PIII are now very old compare to new processor ! can i change this
settings ? to what ?


# ----------------------------
# Garbage collection policy
#
# Defines how engine does garbage collection. Valid values are :
# cooperative
# background
# combined
#
# Superserver has by default "combined" policy
# Classic has by default "cooperative" policy.
# Other values are ignored by classic server build
#
# Type: string (special format)
#
#GCPolicy = combined

I have often a bug during sweep and garbage collection that make my
processor going to 100% for unlimited time. can i change it to
background or cooperative ?


# ----------------------------
# Priority level/class for the server process.
#
# The values are:
# 0 (Zero) - normal priority,
# positive value - high priority (same as -B command line option)
# negative value - low priority.
#
# Note: All changes to this value should be carefully tested to ensure
# that engine is more responsive to requests.
#
# Type: integer
#
#ProcessPriorityLevel = 0

as i m on a firebird dedicated server, can i change this settings ?


# Does the server need to create a (hidden) window used for IPC
communication.
# Turn this off to run the server without a window and hence without
local protocol.
# Can be used for running a few instances of the server
simultaneously on win32.
#
# Type: boolean
#
#CreateInternalWindow = 1

do not really understand this settings ...


to finish, in the Database, did i must change something :
page size : 4096
Page buffer: 10240
buffer size: 40960


also did i forget something ?


many thanks by advance!
stéphane