Difference between revisions of "Ns pools"

From AOLserver Wiki
Jump to navigation Jump to search
 
(15 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<manpage>ns_startcontent</manpage>
 
 
 
'''NAME'''
 
'''NAME'''
  
: ns_pools - Set connection to streaming state for streaming content via ns_write
+
: ns_pools - Configure thread pools (new in AOLserver 4.5)
  
 
'''SYNOPSIS'''
 
'''SYNOPSIS'''
Line 11: Line 9:
 
'''DESCRIPTION'''
 
'''DESCRIPTION'''
  
: This command enables configuration of one or more pools of connection processing threads. The pools allow certain requests to be handled by specific threads. This could, for example, ensure multiple long running requests don't block other short running requests. Pools are selected based on method/url pairs similar to the mappings managed by the [[ns_register_proc]] command. By default, all requests
+
: This command enables configuration of one or more pools of connection processing threads. The pools allow certain requests to be handled by specific threads. This could, for example, ensure multiple long running requests don't block other short running requests. Pools are selected based on method/url pairs similar to the mappings managed by the [[ns_register_proc]] command. By default, all requests are handled by a single, unlimited, "default" pool. There is also an "error" pool as described in [[ns_limits]]. Coupled with the [[ns_limits]] command, pools can provide for sophisticated resource management.
are handled by a single, unlimited, "default" pool. There is also an "error" pool as described below. Coupled with the [[ns_limits]] command, pools can provide for sophisticated resource management.
 
  
 
: This command can be used to set to retrieve various pieces of information about a pool configuration.
 
: This command can be used to set to retrieve various pieces of information about a pool configuration.
  
 +
: The legal ''option''s are:
 +
 +
* '''ns_pools set''' ''poolname'' ''?'' '''-maxthreads''' ''value?'' ''?'' '''-minthreads''' ''value?'' ''?'' '''-maxconns''' ''value? ?'' '''-timeout''' ''value? ?'' '''-spread''' ''value?''
 +
 +
: Configure the specified pool with the given values. ''maxthreads'' specifies the maximum number of connections threads, ''maxthreads'' specifies the minimum number of connection threads, ''maxconns'' is the maximum number of requests sent to a single thread before it stops, ''timeout'' is the idle timeout per thread in this pool per second, ''spread'' is a factor of variance used for setting ''maxconns'' and ''timeout'' to avoid simultaneous shutdowns of many threads. A ''spread'' of 20 (the default value) means the every thread gets the specified value +- 20%. For instance, if ''maxconns'' is specified with a value of 100, every particular thread of this pool will get a random value between 80 and 120. If ''spread'' is set to 0, the specified values are used as specified, like in older versions of aolserver.
  
: The legal ''option''s (which may be abbreviated) are:
+
* '''ns_pools get''' ''poolname''
  
* '''ns_pools set''' ''poolname'' ''?'' '''-maxthreads''' ''maxt?'' ?-minthreads mint? ?-maxconns maxc? ?-timeout t? ?-spread s?''
+
: Returns a map (list of attribute value pairs in array get format) of the actual configuration and runtime values for the specified pool. The command returns values for the following attributes ''minthreads'', ''maxthreads'', ''idle'', ''current'', ''maxconns'', ''queued'', ''timeout'' and ''spread''. ''current'' is the total number of running + idle connection threads for this pool. ''queued'' is the number of connections processed by this pool since startup.
  
: Configure the specified pool with the given values
+
* '''ns_pools list''' ''?pattern?''
 +
 
 +
: Returns a list of the configured pools optionally matching glob pattern in ''pattern''.
 +
 
 +
* '''ns_pools register''' ''pool server method url''
 +
 
 +
: Register pool for requests issued to the specified ''server'', HTTP ''method'' and ''url''
  
 
'''EXAMPLES'''
 
'''EXAMPLES'''
  
: ns_startcontent -type "text/html; charset=[ns_config ns/parameters OutputCharset iso-8859-1]"
+
: ns_pools get default
  
 
'''SEE ALSO'''
 
'''SEE ALSO'''
  
: [[ns_limits]]
+
: [[ns_limits]] [[ns_server]]
 +
 
 +
----
 +
[[Category:Documentation]] - [[Category:Core Tcl API]]

Latest revision as of 18:26, 16 June 2010

NAME

ns_pools - Configure thread pools (new in AOLserver 4.5)

SYNOPSIS

ns_pools option ?arg arg ...?

DESCRIPTION

This command enables configuration of one or more pools of connection processing threads. The pools allow certain requests to be handled by specific threads. This could, for example, ensure multiple long running requests don't block other short running requests. Pools are selected based on method/url pairs similar to the mappings managed by the ns_register_proc command. By default, all requests are handled by a single, unlimited, "default" pool. There is also an "error" pool as described in ns_limits. Coupled with the ns_limits command, pools can provide for sophisticated resource management.
This command can be used to set to retrieve various pieces of information about a pool configuration.
The legal options are:
  • ns_pools set poolname ? -maxthreads value? ? -minthreads value? ? -maxconns value? ? -timeout value? ? -spread value?
Configure the specified pool with the given values. maxthreads specifies the maximum number of connections threads, maxthreads specifies the minimum number of connection threads, maxconns is the maximum number of requests sent to a single thread before it stops, timeout is the idle timeout per thread in this pool per second, spread is a factor of variance used for setting maxconns and timeout to avoid simultaneous shutdowns of many threads. A spread of 20 (the default value) means the every thread gets the specified value +- 20%. For instance, if maxconns is specified with a value of 100, every particular thread of this pool will get a random value between 80 and 120. If spread is set to 0, the specified values are used as specified, like in older versions of aolserver.
  • ns_pools get poolname
Returns a map (list of attribute value pairs in array get format) of the actual configuration and runtime values for the specified pool. The command returns values for the following attributes minthreads, maxthreads, idle, current, maxconns, queued, timeout and spread. current is the total number of running + idle connection threads for this pool. queued is the number of connections processed by this pool since startup.
  • ns_pools list ?pattern?
Returns a list of the configured pools optionally matching glob pattern in pattern.
  • ns_pools register pool server method url
Register pool for requests issued to the specified server, HTTP method and url

EXAMPLES

ns_pools get default

SEE ALSO

ns_limits ns_server

-