ns_section ns/parameters
ns_param User myuser
ns_param ServerLog /myserver/log/error.log
ns_param LogRoll on
ns_param MaxKeepAlive $max_keep_alivens_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.