Right Gaustaf, I don't find it either, it seems it was just there till 3.x one of the thread which I found generated by you.
http://www.mail-archive.com/aolserver@listserv.aol.com/msg07000.html I will just remove that param and will keep only keepwait in params. Regards, Majid. On Sat, Apr 16, 2011 at 3:16 PM, Gustaf Neumann <neum...@wu-wien.ac.at>wrote: > I still don't get, what your are doing with "MaxKeepAlive", but i don't > have to. Be aware, that aolserver does not use it as a config variable (just > do a "fgrep -Ri MaxKeepAlive ." in the src directory). If your application > uses MaxKeepAlive (from tcl, or from one of your c-modules), it is fine. > -gustaf > > > > On 16.04.11 12:05, Majid Khan wrote: > > Hi Gaustaf, > > Thanks for clarifying the maxrun param. About Tcl variables this is how I > am using them: > > ns_section "ns/encodings" > ns_param .adp "utf-8" > ns_param .byt "utf-8" > > set myserver_root "/myserver" > set max_threads 40 > set max_conns 1000 ;# or ConnsPerThread, i.e. after how many requests > processed by a given thread should it be destroyed, 0 means never. > set min_threads 5 > set thread_timeout 120 ;# destroy a thread after this many idle seconds > set max_busy_threads 10 > set max_wait 100 ;# max number of threads waiting to be serviced > set max_wait_time 120 ;# seconds to timeout while waiting to be serviced > set max_keep_alive [expr $max_threads * 3] > set stack_size 2097152 ;# 2MB Limit > set max_upload_limit [expr 20 * 1024 * 1024] ;# 20 MB limit > set max_socks [expr $max_threads + $max_wait + $max_busy_threads] ;# > MaxSock setting to max_threads sum plus MaxWait plus MaxBusyThreads > set nsv_buckets 48 > > ns_section ns/parameters > ns_param User myuser > ns_param ServerLog /myserver/log/error.log > ns_param LogRoll on > *ns_param MaxKeepAlive $max_keep_alive* > ns_param LogMaxBackup 10 > ns_param ListenBacklog 32 > ns_param Home /myserver > ns_param StackSize $stack_size > ns_param auxconfigdir /myserver/parameters > ns_param crashcmd ns_crash > ns_param OutputCharset utf-8 > ns_param dnscache off > ns_param smtphost $smtphost > ns_param inputcharset utf-8 > ns_param URLCharset utf-8 > > ns_section ns/threads > # use more than 1 processor (Solaris) > ns_param SystemScope on > ns_param mutexmeter true > > ns_section ns/server/myserver > ns_param MinThreads $min_threads > ns_param MaxThreads $max_threads > ns_param MaxConns $max_conns > ns_param ThreadTimeout $thread_timeout > ns_param MaxBusyThreads $max_busy_threads > ns_param MaxWait $max_wait > ns_param MaxWaitTime $max_wait_time > ns_param DirectoryFile { index.html } > ns_param UrlStats off > ns_param MaxUrlStats 1000 > ns_param PageRoot "$myserver_root/www" > ns_param globalstats false > ns_param enabletclpages true > ns_param checkmodifiedsince off > > ns_section ns/server/myserver/fastpath > ns_param cache false > ns_param cachemaxentry 16384 > ns_param cachemaxsize 5120000 > > ns_section ns/server/myserver/redirects > ns_param 404 /404.adp > #ns_param 500 /500.htm > > ns_section ns/server/myserver/adp/parsers > ns_param adp {".adp" ;# The simple parser looks for <\% ... \%>} > #fancy=".adp" ;# The fancy parser does a lot more. > > ns_section ns/server/bayt/module/nssock > ns_param Address $ip > ns_param Hostname $domain > ns_param Port $port > ns_param maxinput $max_upload_limit > ns_param MaxSock $max_socks > > About KeepWait what you mentioned is different then maxkeepalive. The idea > is if any client which uses a keep-alive connection (For HTTP/1.1 clients, > persistent connections or keep-alive are the default unless otherwise > specified.) it will be counted as a single request regardless of how many > request has been sent using the same connection which improves the > performance because it would not use any new TCP connection instead. So in > my case I have set maxkeepalive as 120 and there is no such relation between > max_threads variable with that it is just my logic to have it multiply by 3 > otherwise you can ignore and set it as whatever you want. I didn't set > keepwait which I should thanks for mentioning that I will set it up to 30 > sec which means after 30 secs hang up clients while waiting for an HTTP > request in a connection in a keep-alive situation. Setting to a high value > may cause performance problems in heavily loaded servers. The higher the > timeout, the more server connections will be kept occupied waiting on > connections with idle clients. The purpose of writing Gustaf in such a > detailed way is just because I wanted to make sure what I understand is > correct and others can benefit of it in our community to understand the > logic of the config params. > > One last thing which I found I should do is about the DNS tuning, so I have > taken the following code from > http://www.aolserver.com/docs/admin/config-reference.tcl.txt and will put > it in my config file. > > # DNS tuning > ns_param dnscache true ;# In-memory cache of DNS lookups > ns_param dnscachetimeout 60 ;# How long to keep hostnames in cache > > dnscachetimeout is I think in mins. > > Regards, > > Majid. > > On Sat, Apr 16, 2011 at 11:02 AM, Gustaf Neumann <neum...@wu-wien.ac.at>wrote: > >> Hi Majid, >> >> maxrun is one way to limit the maximum number of concurrent connections. >> It allows to limit certain kinds of requests (actually the queueing of >> incoming requests). See the naviserver man page for an example >> http://naviserver.sourceforge.net/n/naviserver/files/ns_limits.html >> >> If you have max_threads set to 40, you won't have at any time more than 40 >> connection threads running (no matter, whether you set the default maxrun to >> 40 or 500 or leave the default of 100). If you have no special intentions >> with maxruns, i would recommend to leave it to the default. >> >> In your snippet, you set just some Tcl variables. In several cases it is >> not obvious how these are used to set the actual config variables of >> aolserver. For example, the setting of max_keep_alive wonders me: The >> keep-alive of the server is controlled via the config variable "keepwait", >> which is a value specified in secs. It is somewhat strange that you seem to >> bring this in relation with max_threads, ... but maybe, your naming is just >> misleading. >> >> -gustaf neumann >> >> >> On 15.04.11 23:48, Majid Khan wrote: >> >>> Hi All, >>> >>> I am done with the basic understanding of the configuration of aol4.5.1 >>> and I have set the following variable for my configuration. Since we have >>> full openACS files with alot of customization and too much additional TCL >>> files so I have set the connecitons per threads 1000 and after that it will >>> destroy which to me initially looks good enough though I didn't go live but >>> I am planning to go with that. I was just confused on one of the parameter >>> that is maxruns which I read is that it is the concurrent connection to the >>> server and I found one of the example where they set maxruns=maxthreads so >>> my question is should I do the same thing doesn't it mean that it will just >>> accept 40 concurrent connections in my case? however we have a very busy >>> site and we don't want that it should be just limited to 40 so I am planing >>> to set it to 500 please correct me if my understanding is incorrect also >>> suggest me if there is anything which needs to be tuned more in my below >>> settings. >>> >>> set max_threads 40 >>> set max_conns 1000 ;# or ConnsPerThread, i.e. after how many requests >>> processed by a given thread should it be destroyed, 0 means never. >>> set min_threads 5 >>> set thread_timeout 120 ;# destroy an idle thread after this many idle >>> seconds >>> set max_busy_threads 10 >>> set max_wait 100 ;# max number of threads waiting to be serviced >>> set max_wait_time 120 ;# seconds to timeout while waiting to be serviced >>> set max_keep_alive [expr $max_threads * 3] >>> set stack_size 2097152 ;# 2 MB >>> set max_upload_limit [expr 20 * 1024 * 1024] ;# 20 MB limit >>> set max_socks [expr $max_threads + $max_wait + $max_busy_threads] ;# >>> MaxSock setting to max_threads sum plus MaxWait plus MaxBusyThreads >>> set nsv_buckets 48 >>> >>> >>> Best Regards, >>> >>> Majid. >>> >>> -- AOLserver - http://www.aolserver.com/ >>> >>> To Remove yourself from this list, simply send an email to < >>> lists...@listserv.aol.com> with the body of "SIGNOFF AOLSERVER" in the >>> email message. You can leave the Subject: field of your email blank. >>> >>> >> > > -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to <lists...@listserv.aol.com> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.