* bsd_helper.cc (securityinit): New function. Move initialization
of security related variables from ipcinit here. * bsd_helper.h (securityinit): Add prototype. * cygserver.cc (main): Call securityinit right after wincap.init. * process.cc (process_cache::process): Fix maximum process condition. * README: Add description for new -p/--process-cache option. * bsd_helper.cc (default_tun_check): Add kern.srv.process_cache_size entry to tunable_params. Set max value of kern.srv.request_threads to 310. * cygserver.cc (SERVER_VERSION): Set to 1.20. (print_usage): Print usage of new parameter -p. (main): Add process cache parameter handling. Accomodate new max value of request threads. * cygserver.conf: Add kern.srv.process_cache_size tunable parameter. Accomodate new max value of kern.srv.request_threads. * process.cc: Fix a comment. (process_cache::process_cache): Add max process cache size parameter. Change _cache_add_trigger to manual reset event. (struct pcache_wait_t): New struct used as parameter to pcache_wait_thread. (pcache_wait_thread): New thread function used for threaded process cache. (process_cache::wait_for_processes): Use threaded waiting if number of processes to wait for is bigger than 62. Always check all processes to avoid race under heavy load. (process_cache::sync_wait_array): Remove useless assert. Reset _cache_add_trigger right at the start since it's manual reset now. Accomodate threaded waiting. * process.h (process_cache::process_cache): Add max_procs parameter. (process_cache::_max_process_count): New member. (process_cache::_wait_array: Raise to allow up to 5 wait threads. (process_cache::_process_array): Ditto.
This commit is contained in:
@ -51,6 +51,27 @@ Cygserver command line options:
|
||||
under heavy load conditions or on slow machines.
|
||||
Configuration file option: kern.srv.request_threads
|
||||
|
||||
-p, --process-cache <num>
|
||||
|
||||
Number of processes which can connect concurrently to cygserver.
|
||||
Default is 62. Each process connected to cygserver is a synchronization
|
||||
object which has to be maintained. The data structure to maintain these
|
||||
processes is the so-called "process cache". In theory, an arbitrary
|
||||
number of processes could connect to cygserver, but due to the need to
|
||||
synchronize, the higher the number of connected processes, the more
|
||||
synchronization overhead exists. By using this option, you can set an
|
||||
upper limit to the synchronization effort. If more than 62 processes
|
||||
try to connect to cygserver concurrently, two additional synchronization
|
||||
threads are necessary, and one for each further 62 concurrent
|
||||
processes. So, useful values for the --process-cache option are 62, 124,
|
||||
186, 248, 310. 310 is the maximum value.
|
||||
Configuration file option: kern.srv.process_cache_size
|
||||
|
||||
NOTE: The number of child processes of a single parent process is limited
|
||||
to 256. So in case of taking advantage of a process cache size beyond 256,
|
||||
keep in mind that not all of these processes can be child processes of one
|
||||
single parent process.
|
||||
|
||||
-d, --debug
|
||||
|
||||
Log debug messages to stderr. These will clutter your stderr output with
|
||||
|
Reference in New Issue
Block a user