diff options
author | Simo Sorce <idra@samba.org> | 2011-08-12 12:24:13 -0400 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2011-08-21 09:05:04 -0400 |
commit | 2a0aac0adcdccc165f5d511d7a1c1d6d0c5d7c9b (patch) | |
tree | 0288a7f47035af9cb14b6450751ff02b4894b0e8 /source3/lib/server_prefork.h | |
parent | eb8a0c76725500d183c50eb795c683f23d4aede7 (diff) | |
download | samba-2a0aac0adcdccc165f5d511d7a1c1d6d0c5d7c9b.tar.gz samba-2a0aac0adcdccc165f5d511d7a1c1d6d0c5d7c9b.tar.xz samba-2a0aac0adcdccc165f5d511d7a1c1d6d0c5d7c9b.zip |
s3-prefork: Allow better management of allowed_clients
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
Diffstat (limited to 'source3/lib/server_prefork.h')
-rw-r--r-- | source3/lib/server_prefork.h | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/source3/lib/server_prefork.h b/source3/lib/server_prefork.h index 4874359e0b2..a861993c7aa 100644 --- a/source3/lib/server_prefork.h +++ b/source3/lib/server_prefork.h @@ -181,17 +181,34 @@ int prefork_retire_children(struct prefork_pool *pfp, int prefork_count_active_children(struct prefork_pool *pfp, int *total); /** -* @brief Inform all children that they are allowed to accept 'max' clients -* now. Use this when all children are already busy and more clients -* are trying to connect. It will allow each child to handle more than -* one client at a time, up to 'max'. +* @brief Count the number of actual connections currently allowed +* +* @param pfp The pool. +* +* @return The number of connections that can still be opened by clients +* with the current pool of children. +*/ +int prefork_count_allowed_connections(struct prefork_pool *pfp); + +/** +* @brief Increase the amount of clients each child is allowed to handle +* simultaneaously. It will allow each child to handle more than +* one client at a time, up to 'max' (currently set to 100). * * @param pfp The pool. -* @param max Max number of clients per child. +* @param max Max number of allowed connections per child */ void prefork_increase_allowed_clients(struct prefork_pool *pfp, int max); /** +* @brief Decrease the amount of clients each child is allowed to handle. +* Min is 1. +* +* @param pfp The pool. +*/ +void prefork_decrease_allowed_clients(struct prefork_pool *pfp); + +/** * @brief Reset the maximum allowd clients per child to 1. * Does not reduce the number of clients actually beeing served by * any given child, but prevents children from overcommitting from |