Fix OPENDJ-383 : Expose JE fileCacheSize property through OpenDJ configuration and admin
Added optional ds-cfg-db-log-filecache-size attribute.
| | |
| | | ds-cfg-db-evictor-max-threads: 10 |
| | | ds-cfg-db-evictor-keep-alive: 600 seconds |
| | | ds-cfg-db-log-file-max: 10 megabytes |
| | | ds-cfg-db-log-filecache-size: 100 |
| | | ds-cfg-db-logging-file-handler-on: true |
| | | ds-cfg-db-logging-level: CONFIG |
| | | ds-cfg-db-checkpointer-bytes-interval: 20 megabytes |
| | |
| | | SINGLE-VALUE |
| | | SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 |
| | | X-ORIGIN 'OpenDJ Directory Server' ) |
| | | attributeTypes: ( 1.3.6.1.4.1.36733.2.1.1.56 |
| | | NAME 'ds-cfg-db-log-filecache-size' |
| | | SINGLE-VALUE |
| | | SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 |
| | | X-ORIGIN 'OpenDJ Directory Server' ) |
| | | objectClasses: ( 1.3.6.1.4.1.26027.1.2.1 |
| | | NAME 'ds-cfg-access-control-handler' |
| | | SUP top |
| | |
| | | ds-cfg-db-evictor-keep-alive $ |
| | | ds-cfg-db-evictor-nodes-per-scan $ |
| | | ds-cfg-db-log-file-max $ |
| | | ds-cfg-db-log-filecache-size $ |
| | | ds-cfg-db-logging-file-handler-on $ |
| | | ds-cfg-db-logging-level $ |
| | | ds-cfg-db-checkpointer-bytes-interval $ |
| | |
| | | </ldap:attribute> |
| | | </adm:profile> |
| | | </adm:property> |
| | | <adm:property name="db-log-filecache-size" advanced="true"> |
| | | <adm:synopsis> |
| | | Specifies the size of the file handle cache. |
| | | </adm:synopsis> |
| | | <adm:description> |
| | | The file handle cache is used to keep as much opened log files |
| | | as possible. When the cache is smaller than the number of logs, |
| | | the database needs to close some handles and open log files it needs, |
| | | resulting in less optimal performances. Ideally, the size of the cache |
| | | should be higher than the number of files contained in the database. |
| | | Make sure the OS number of open files per process is also tuned |
| | | appropriately. |
| | | </adm:description> |
| | | <adm:requires-admin-action> |
| | | <adm:component-restart /> |
| | | </adm:requires-admin-action> |
| | | <adm:default-behavior> |
| | | <adm:defined> |
| | | <adm:value>100</adm:value> |
| | | </adm:defined> |
| | | </adm:default-behavior> |
| | | <adm:syntax> |
| | | <adm:integer lower-limit="3" upper-limit="2147483647" /> |
| | | </adm:syntax> |
| | | <adm:profile name="ldap"> |
| | | <ldap:attribute> |
| | | <ldap:name>ds-cfg-db-log-filecache-size</ldap:name> |
| | | </ldap:attribute> |
| | | </adm:profile> |
| | | </adm:property> |
| | | <adm:property name="db-logging-file-handler-on" advanced="true"> |
| | | <adm:synopsis> |
| | | Indicates whether the database should maintain a je.info file in |
| | |
| | | property.db-evictor-max-threads.description=Specifies the maximum number of threads in the eviction thread pool. These threads help keep memory usage within cache bounds, offloading work from application threads. db-evictor-core-threads, db-evictor-max-threads and db-evictor-keep-alive are used to configure the core, max and keepalive attributes for the eviction thread pool. |
| | | property.db-evictor-nodes-per-scan.synopsis=Specifies the number of Btree nodes that should be evicted from the cache in a single pass if it is determined that it is necessary to free existing data in order to make room for new information. |
| | | property.db-evictor-nodes-per-scan.description=Changes to this property do not take effect until the backend is restarted. It is recommended that you also change this property when you set db-evictor-lru-only to false. This setting controls the number of Btree nodes that are considered, or sampled, each time a node is evicted. A setting of 10 often produces good results, but this may vary from application to application. The larger the nodes per scan, the more accurate the algorithm. However, don't set it too high. When considering larger numbers of nodes for each eviction, the evictor may delay the completion of a given database operation, which impacts the response time of the application thread. In JE 4.1 and later, setting this value too high in an application that is largely CPU bound can reduce the effectiveness of cache eviction. It's best to start with the default value, and increase it gradually to see if it is beneficial for your application. |
| | | property.db-log-filecache-size.synopsis=Specifies the size of the file handle cache. |
| | | property.db-log-filecache-size.description=The file handle cache is used to keep as much opened log files as possible. When the cache is smaller than the number of logs, the database needs to close some handles and open log files it needs, resulting in less optimal performances. Ideally, the size of the cache should be higher than the number of files contained in the database. Make sure the OS number of open files per process is also tuned appropriately. |
| | | property.db-log-file-max.synopsis=Specifies the maximum size for a database log file. |
| | | property.db-logging-file-handler-on.synopsis=Indicates whether the database should maintain a je.info file in the same directory as the database log directory. |
| | | property.db-logging-file-handler-on.description=This file contains information about the internal processing performed by the underlying database. |
| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2010 ForgeRock AS. |
| | | * Portions Copyright 2010-2011 ForgeRock AS. |
| | | */ |
| | | package org.opends.server.backends.jeb; |
| | | |
| | |
| | | public static final String ATTR_NUM_CLEANER_THREADS = |
| | | ConfigConstants.NAME_PREFIX_CFG + "db-num-cleaner-threads"; |
| | | |
| | | /** |
| | | * The name of the attribute which configures the size of the file |
| | | * handle cache. |
| | | */ |
| | | public static final String ATTR_LOG_FILECACHE_SIZE = |
| | | ConfigConstants.NAME_PREFIX_CFG + "db-log-filecache-size"; |
| | | |
| | | |
| | | /** |
| | | * The name of the attribute which may specify any native JE properties. |
| | |
| | | ATTR_CHECKPOINTER_WAKEUP_INTERVAL); |
| | | registerProp("je.lock.nLockTables", ATTR_NUM_LOCK_TABLES); |
| | | registerProp("je.cleaner.threads", ATTR_NUM_CLEANER_THREADS); |
| | | registerProp("je.log.fileCacheSize", ATTR_LOG_FILECACHE_SIZE); |
| | | } |
| | | catch (Exception e) |
| | | { |