Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello,
I need to create a Control Unit for the Apache server (v1.3.41) which will minimize the response times (server side) by altering online the MaxClients and KeepAliveTimeout Directives (will alter and do a graceful restart every time they need to be altered). The problem is that i cant find a way to extract the proper metrics such as Hits/sec Requests/sec Simultaneous Connections/sec Server Response time Per Connection etc. Anyone has any idea where to look?
Well i considered parsing data from ./apachectl status but it only gives information about the following: requests/sec - B/second - B/request. If i run a benchmark i'll get info for a single config, the point is that i need to know how long (how loaded is the server) takes apache to serve the requests (aka Response Time), that way i'll be able to apply this as feedback to my Controller and give it a hint to adjust the MaxClients and KeepAliveTimeout Directives. All this has to be done while the server is on Production Status. Now i know there is (somewhere i cant find ) a module called mod_rt that is supposed to output that kind of info... but it's nowhere to be found
Did you enable ExtendedStatus , and use apachectl fullstatus ?
Yes i did that of course.
Code:
ExtendedStatus On
I used both ways
Code:
./apachectl status
and
Code:
./apachectl fullstatus
neither approach gave me the server responce time though. The following is the output of ./apachectl fullstatus.
Code:
Apache Server Status for 192.168.1.11
Server Version: Apache/1.3.41 (Unix)
Server Built: Jul 4 2008 20:56:58
_________________________________________________________________
Current Time: Sunday, 06-Jul-2008 22:58:55 EEST
Restart Time: Sunday, 06-Jul-2008 22:00:19 EEST
Parent Server Generation: 0
Server uptime: 58 minutes 36 seconds
Total accesses: 4 - Total Traffic: 14 kB
CPU Usage: u0 s0 cu0 cs0
.00114 requests/sec - 4 B/second - 3584 B/request
1 requests currently being processed, 4 idle servers
____W...........................................................
................................................................
................................................................
................................................................
Scoreboard Key:
"_" Waiting for Connection, "S" Starting up, "R" Reading Request,
"W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
"L" Logging, "G" Gracefully finishing, "." Open slot with no current
process
Srv PID Acc M CPU SS Req Conn Child Slot Host VHost Request
0-0 6264 0/1/1 _ 0.00 3515 26 0.0 0.00 0.00 localhost 192.168.1.11 GET
/server-status HTTP/1.0
1-0 6265 0/1/1 _ 0.00 3515 0 0.0 0.00 0.00 localhost 192.168.1.11 GET
/server-status HTTP/1.0
2-0 6266 0/1/1 _ 0.00 3515 0 0.0 0.00 0.00 localhost 192.168.1.11 GET
/server-status HTTP/1.0
3-0 6267 0/1/1 _ 0.00 3515 0 0.0 0.00 0.00 localhost 192.168.1.11 GET
/server-status HTTP/1.0
4-0 6268 0/0/0 W 0.00 3515 101409542 0.0 0.00 0.00 127.0.0.1
192.168.1.11 GET /server-status HTTP/1.0
_________________________________________________________________
Srv Child Server number - generation
PID OS process ID
Acc Number of accesses this connection / this child / this slot
M Mode of operation
CPU CPU usage, number of seconds
SS Seconds since beginning of most recent request
Req Milliseconds required to process most recent request
Conn Kilobytes transferred this connection
Child Megabytes transferred this child
Slot Total megabytes transferred this slot
_________________________________________________________________
Hmmm, well, you might need to refine "server responce" [sic] / Response Time. Are you looking for:
- transactions per second
- time until service of connection beings (latency)
- time taken to complete transaction (depends upon payload size)
- average transactions / second (regardless of payload size)
- average per worker thread/process? per server ?
I don't know of any modules that give you what you are asking.
Hmmm, well, you might need to refine "server responce" [sic] / Response Time. Are you looking for:
- transactions per second
- time until service of connection beings (latency)
- time taken to complete transaction (depends upon payload size)
- average transactions / second (regardless of payload size)
- average per worker thread/process? per server ?
I don't know of any modules that give you what you are asking.
Yep all of the above except the last one which is way too much process intensive and rather useless since can be inferred by the others on average. Actually i can get all these information by parsing the data of a packet sniffer but my hunch is that it has to be an easier way to do that, plus if i employ that solution i'll be utilizing at least 5-10% of the server's resources (CPU and RAM) only to get info about the metrics
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.