|
||||
Important NoticeMany of the system configuration options can now be changed at runtime using the system configuration tool.This document describes the various configuration and tuning options available for the 1060 NetKernel and some important standard components NetKernel ConfigurationThe 1060kernel.jar file contains a configuration file
ThrottleThe throttle sits between transports accepting external requests and
the kernel. Its limits the concurrent load that can be placed on the Kernel since too The throttle guarantees in order execution of requests. Suggested performance tuning should be to either:
The Throttle Monitor may be used to monitor dynamic throttle behaviour which gives a guide to service levels experienced by clients. schedulerThreadsThe scheduler doesn't use a thread-per-request approach to processing. Instead it manages a pool of threads which perform chunks of work on requests. Therefore the number of threads doesn't need to be as large as the number of requests if all requests are made asynchronously- synchronous requests causes the requesting thread to be blocked. In order to efficiently use a multiprocessor system you will need at least as many scheduler threads as processors. Because most requests make use of synchronous requests internally- DPML for example you will usually need 2xThrottle number of scheduler threads. The scheduler will increase threads if it detects starvation due to blocked threads or deadlock. requestMappingCacheSizeThis is an internal cache that optimises request mapping in the module manager. The default value gives a balance between memory usage and performance. The more varied the diet of the kernel the larger this value may need to be. The system will work fine no caching but just be a bit slower. houseKeepingPeriodThis is the number of milliseconds that all system components are polled to update their statistics and perform any housekeeping. deadlockPeriodThe scheduler deadlock detector will flag a session as being deadlocked if it hasn't made a sub-request within this period of time. It will first attempt to increase the thread count to see if deadlock was caused by starvation. If this fails it will issue a failed "deadlock" response on behalf of the blocked request. This will then usually resolve the deadlock by releasing locks and will signal the problem. Deadlocks of this sort indicate programmatic errors and should be investigated. defaultResourceExpiryDuring development it is useful for externally modified files to be detected. Setting this value low will allow changes in files to be detected at the expense of constant rechecking. Set this value high on a deployed system where files do not change or are changed through the NetKernel itself and not externally. A low value is similar to not having a cache but will yield better performance as resources are only re-evaluated if they are changed. One of the main effects of having a low value is that any served resources over HTTP will not have a very long validity period. initURI
statistics/frequencyDivisorThis integer value is the number of housekeeping periods between generating new statistical snapshots for memory and workload. statistics/historySizeThe number of historical samples that are kept. statistics/timestampFormatThe timestamp format in the historical samples Kernel Logging HandlersKernel Logging can be configured in two dimensions. Who receives the logging
messages and which logging events are dispatched. Handlers can be added
which receive the events these must implement Default Config<system>
<!-- ************************************************************ Resource Locations NB All paths are resolved with respect to the <install> basepath. eg /scratch uses <install>/scratch ************************************************************ --> <!-- ********** Scratch - single location of the scratch override directory ********** --> <scratchDir>/scratch</scratchDir> <!-- ********** Directory to expand Jar /lib directories of Modules to ********** --> <expandedJarPool>/lib/expanded</expandedJarPool> <!-- ************************************************************ Kernel Settings ************************************************************ --> <!-- ********** Maximum number of concurrent requests allowed to enter Kernel from the Transports. ********** --> <throttle>5</throttle> <!-- ********** Maximum number of requests queued before requests are rejected by throttle. ********** --> <throttleQueue>10</throttleQueue> <!-- ********** Number of Scheduler Threads to start with. Number grows if blocking requests are made. Kernel manages the number of additional threads above this baseline on a demand basis. ********** --> <schedulerThreads>2</schedulerThreads> <!-- ********** Number of lines of the exception stack to serialize to the XML Exception document ********** --> <exceptionStackDepth>4</exceptionStackDepth> <!-- ********** The URI of the module containing a cache to use as default if none is specified in a specific module ********** --> <defaultCacheModule>urn:org:ten60:netkernel:cache:standard</defaultCacheModule> <!-- ********** The size of the cache kept by the scheduler of requests resolved to accessors ********** --> <requestMappingCacheSize>512</requestMappingCacheSize> <!-- ********** HouseKeeping Thread execution period in milliseconds ********** --> <houseKeepingPeriod>500</houseKeepingPeriod> <!-- ********** Period of inactivity within a session after which deadlock is assumed. Deadlock resolution process includes increasing available threads and issuing an interrupted response. ********** --> <deadlockPeriod>30000</deadlockPeriod> <!-- ********** Interval for which an ffcpl: resource is assumed to be valid and will not be rechecked for freshness. Set low for easy development and high for maximum performance in deployment ********** --> <defaultResourceExpiry>1000</defaultResourceExpiry> <!-- ********** This URI is requested by the kernel after sucessful startup ********** --> <initURI>active:init</initURI> <initModule>urn:org:ten60:netkernel:ext:kernel</initModule> <!-- ************************************************************ Kernel Statistics Settings ************************************************************ --> <statistics> <!-- ********** Number of times Housekeeper must run before a sample is taken ********** --> <frequencyDivisor>10</frequencyDivisor> <!-- ********** Number of statistic samples to store ********** --> <historySize>60</historySize> <!-- ********** Format for statistic time stamp ********** --> <timestampFormat>HH:mm:ss</timestampFormat> </statistics> <!-- ************************************************************ Kernel Logger Settings ************************************************************ --> <log> <!-- ********** Logging Handler - as many as required ********** --> <handler> <handlerClass>java.util.logging.ConsoleHandler</handlerClass> <formatterClass>com.ten60.netkernel.util.ConsoleFormatter</formatterClass> </handler> <!-- ********** Log level settings - values can be: debug, fine, info, warning, severe, application, container ********** --> <level> <warning /> <severe /> <application /> <container /> </level> </log> </system> Deployed ModulesA Cache ConfigurationCaches may be imported for each module, in general however a single cache for all modules imported in the application fulcrum is the most common configuration.
The standard_cache module provides a smart cache DependencyCostCache which takes some configuration options.
The configuration is read from <config>
<!-- ********* Cache Size Total number of cached resources ********* --> <cacheSize>200</cacheSize> <!-- ********* Prune Size Number of cached resources to remove in a cache prune cycle ********* --> <pruneSize>40</pruneSize> <!-- ********* Memory Threshold Maximum baseline memory size above which cache pruning is forced. Expressed as %age. ********* --> <memoryThreshold>66</memoryThreshold> <!-- ********* Puts Threshold Number of additional PUTS after a prune cycle before memory testing is resumed ********* --> <putsThreshold>20</putsThreshold> </config> This cache configuration will attempt to keep a float of 200 resources upto a limit of occupying 66% of available JVM heap space. Actuall memory may be monitored in real time using the Memory Monitor. Applications which require a large amount of working memory may operate more efficiently if the memory consumption of the cache is further limited. Transport ConfigurationLike the cache config, transport configuration is specified in the module that imports a transport.
The Jetty HTTP transport configuration is specified at
|
||||
|
© 2003,2004, 1060® Research Limited
1060 registered trademark, NetKernel trademark of 1060 Research Limited
|
||||