Sponsored Content
Operating Systems Linux Red Hat apache high cpu load on high traffic Post 302560699 by awww on Friday 30th of September 2011 03:02:21 PM
Old 09-30-2011
apache high cpu load on high traffic

i have a Intel Quad Core Xeon X3440 (4 x 2.53GHz, 8MB Cache, Hyper Threaded) with 16gig and 1tb harddrive with a 1gb port and my apache is causing my cpu to go up to 100% on all four cores heres my http.config

Code:
<IfModule prefork.c>
StartServers 10
MinSpareServers 10
MaxSpareServers 15
ServerLimit 1000
MaxClients 1000
MaxRequestsPerChild 5000
</IfModule>

<IfModule worker.c>
StartServers 35
MaxClients 200
MinSpareThreads 30
MaxSpareThreads 305 
ThreadsPerChild 255
MaxRequestsPerChild 0
</IfModule>

KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 800

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 2

Moderator's Comments:
Mod Comment Video tutorial on how to use code tags in The UNIX and Linux Forums.

Last edited by radoulov; 09-30-2011 at 05:04 PM..
 

10 More Discussions You Might Find Interesting

1. AIX

Application high CPU load

after a long period of running, the network application's CPU load in our syst em increase slowly, the failed at the end. we use "truss" tool to trace the process, found that it processes something like "semop" ,"semctl","thread_waitlock","kread" kernel call . The trace log file looks like the... (0 Replies)
Discussion started by: Frank2004
0 Replies

2. UNIX for Advanced & Expert Users

Sun: High kernel usage & very high load averages

Hi, I am seeing very high kernel usage and very high load averages on my system (Although we are not loading much data to our database). Here is the output of top...does anyone know what i should be looking at? Thanks, Lorraine last pid: 13144; load averages: 22.32, 19.81, 16.78 ... (4 Replies)
Discussion started by: lorrainenineill
4 Replies

3. HP-UX

HIgh Load

Hi All. In my production server the load is very high. normally it used to be less than 1,but now it is more than 5. I am new to unix all together. I want to know what is the reason behind high load. and if it is high what is the impact? (4 Replies)
Discussion started by: jyoti
4 Replies

4. Red Hat

High cpu load average

Hi Buddies, Thanx for reading my first post... After googling a lot and searching so many forums I am feeling down a bit... Please don't mind my ignorence, and my grammer ... :) My server is running RHEL 2.6.9-5.EL. The cpu load is going higher than roof, almost 100 sometimes. I am... (2 Replies)
Discussion started by: squid04
2 Replies

5. Solaris

nestat on server involved in high traffic network

Hi All My Server is doing a very intense netowrk traffic operations and the cards are under very high pressure. I need to call NETSTAT on the shell. Do you know whether this command, under high pressure, might have some impact on the server traffic or can I proceed without any problem? (2 Replies)
Discussion started by: manustone
2 Replies

6. UNIX for Advanced & Expert Users

What's a high load for my system?

I'm not sure if this belong in dummies or advanced so I made my best guess. Go easy on me if I get it wrong. I'm trying to determine what a high load for my system is. I run a php/mysql web server with a dedicated host. The host has a Intel Xeon 3110 (Dual Core) processor. Our load seems to... (5 Replies)
Discussion started by: vanguard
5 Replies

7. Shell Programming and Scripting

what would a script include to find CPU's %system time high and user time high?

Hi , I am trying to :wall: my head while scripting ..I am really new to this stuff , never did it before :( . how to find cpu's system high time and user time high in a script?? thanks , help would be appreciated ! :) (9 Replies)
Discussion started by: sushwey
9 Replies

8. Shell Programming and Scripting

Restart debian server if one specific process has more than 10 seconds have high cpu load

Hi, could someone give me an example for a debian server script? I need to check a process if the process has a high cpu load (top). If yes the whole server needs to reboot. Thats it, nothing more. ;) Hope someone could help me. Regards woisch (2 Replies)
Discussion started by: woisch
2 Replies

9. Red Hat

CPU high - apache real server OK, virtual server not

Got two RHEL servers - one real and one virtual/cloud. Both run apache web server. When traffic is applied, CPU seems to go quite high on virtual one (20%) but real is not really affected. Worry is that a further increase in traffic will see a problem. Experience of RHEL is limited. Whats... (2 Replies)
Discussion started by: psychocandy
2 Replies

10. UNIX for Dummies Questions & Answers

I have a 12 core Linux cpu but the load is really high on this box, hovering around 50.

I have a 12 core linux cpu but the load is really high on this box, hovering around 50. What configuration changes do we need to make so that system have no bottleneck. (13 Replies)
Discussion started by: Moon1234
13 Replies
tntnet.conf(7)							Tntnet users guide						    tntnet.conf(7)

NAME
tntnet.conf - configuration-file for tntnet(8) DESCRIPTION
Tntnet is configured in the configuration-file tntnet.conf. tntnet.conf contains configuration variables with parameters. Each line in tntnet.conf is either empty, a comment starting with '#' or a variable with 0 or more parameters. The variablename and parameters are spearated by whitespace. A parameter can be surrounded by quotation-marks (")or apostrophes ('). If the parameter is marked this way, it can contain whitespace itself - even linefeeds. If the value itself needs to have the separator, the character can be prepended by backslash, which disables the special meaning of the character itself. Examples: Varname value Defines a variable with the name Varname and the value value. Varname2 value1 value2 "This is a value with whitespace and newline and quotationsmark: "" Defines a variable with 3 parameters. CONFIGURATION VARIABLES
This section describes the variables, used by Tntnet(8). AccessLog filename Writes a log entry for each request in a common format. This format is compatible with most log file analyze systems for http servers. The log file has the fields: peer-ip - username [time] "http-method query-string HTTP/major-version.minor-version" http-return-code content-size "referer" "user-agent" The username, referer and user-agent may be '-' when the value is not available. Also the content-size can be empty in rare cases. Example AccessLog /var/log/tntnet/access.log BufferSize bytes Specifies the number of bytes sent in a single system-call. This does not limit anything in application-level. It does not affect e.g. savepoints or exception-handling. Component-output is collected completely and then passed in chunks of BufferSize bytes to the operating system. The default value is 16384. CompPath directory CompPath specifies, where tntnet should search for webapplications. Tntnet searches first in the current directory and then in each direc- tory, you specify here, until a library is found. You can repeat the directive as many times as desired to add more entries. If it is not found, the next MapUrl-entry is tried. Example CompPath /usr/local/lib/tntnet CompPath /usr/local/share/tntnet Chroot directory Does a chroot(2)-system call on startup, which locks the process into the directory at system-level. Example Chroot /var/tntnet Daemon 0|1 If this flag is set to 1, Tntnet forks at startup and terminates the parent-process on successful initialization. Dir directory Changes the current working directory of the process on startup. Example Dir /var/tntnet EnableCompression yes|no Specifies, if Tntnet should use gzip-compression at http-level. By default Tntnet use compression. A http-client like a web browser can send a header "Accept-Encoding", to tell Tntnet, that it would accept compressed data. Tntnet then can decide, if it use compression. When the body is complete, Tntnet tries to compress the body. If the data can be compressed by more than 10%, Tntnet sends this compressed data. With this flag, this feature can be turned off. Compression slows down processing but reduces the network-load. Normally the size of html-pages can be compressed by about 70%, while Tnt- net slows down by up to 30%. Example EnableCompression no ErrorLog filename Redirects stderr to the specified file when tntnet runs as a daemon. If ErrorLog is not set stderr is redirected to /dev/null. Example ErrorLog /var/log/tntnet/error.log Group unix-group Changes the group under which tntnet answers requests. Example Group tntnet-group include filemask Reads additional settings from the specified files. Filemask might contain glob-characters, so that multiple files might be read. The order is not specified. Example include /etc/tntnet.d/*.conf KeepAliveTimeout milliseconds Sets the timeout for keep-alive requests. Tntnet tries to do keep-alive-requests wherever possible. This has the effect, that tntnet can receive multiple requests within a single tcp-connection. The connection times out after KeepAliveTimeout milliseconds. The timeout defaults to 15000ms. Example KeepAliveTimeout 300000 KeepAliveMax number Sets the maximum number of request per tcp-connection. This defaults to 100. Example KeepAliveMax 10 Listen ip [port] Specifies, on which address tntnet waits for connections. There can be more than one Listen-directives, in which case tntnet waits on every address. If there is no Listen-directive tntnet listens on 0.0.0.0 port 80. ip might also be a hostname. Example Listen 127.0.0.1 8000 ListenRetry number On startup Tntnet calls listen on the specified port. When the systemcall returns with an error, Tntnet tries again and fails after the specified number of attempts. The default number is 5. Example ListenRetry 10 ListenBacklog number The system-call listen(3p) needs a parameter backlog, which specifies, how many pending connections the operating-system should queue before it starts to ignore new request. The value is configurable here. The default value is 16 Example ListenBacklog 64 MapUrl url component-identifier [ path-info { additional-arguments } ] Tells tntnet, which component should be called, when it receives a http-request. url is a regular expression, which is tried against the request-url. If it matches, the component-identifier is evaluated. component-idetifier may contain backreferences to the url. By default the url is passed as path-info to the component, but this can be changed with a third parameter. Additional parameters can be passed to the component and accessed through tnt::httpRequest::getArgs(). This variable can occur more than once and they are tried in the order they are found in the configurationfile, until the regular expres- sion matches and the component does not return tnt::DECLINED. If no MapUrl-directive is found, http-error 404 (not found) is sent. Example # maps html-pages to components in myapp.so; e.g. /foo.html calls foo@myapp MapUrl /([^/.]+).html $1@myapp # maps jpeg-urls to myapp; e.g. /foo.jpeg calls foo_jpg@myapp MapUrl /([^/.]+).jpeg $1_jpg@myapp # maps /foo/bar.html to bar@foo MapUrl /([^/.]+)/([^/.].html $2@$1 Example MapUrlMapCache size As described in MapUrl urls are mapped to components with regular expressions. This is a quite expensive operation, while the number of different urls used in a typical web application is small. Therefore Tntnet has a simple cache, which stores mappings to prevent the need to process the same regular expression multiple times. The size of this cache is limited. After the size is exceeded the cache is simply cleared. This clearing is logged with the message "clear url-map-cache". If you have a application whit many different urls and you often see this warning-message, you might want to increase the cache. The default value is 8192. Example MapUrlMapCache 32768 MaxRequestSize number This directive limits the size of the request. After number Bytes the connection is just closed. This prevents denial-of-service-attacks through long requests. Every request is read into memory, so it must fit into it. Bear in mind, that if you use file-upload-fields a request might be larger than just a few bytes. The value defaults to 0, which means, that there is no limit at all. Example MaxRequestSize 65536 MaxRequestTime seconds In daemon mode tntnet has a watchdog, which restarts tntnet when the maximum request time is exceeded. This happens, when a request is in a endless loop or otherwise hangs. Restarting tntnet looses all active sessions and the currently running requests. Therefore the timeout should be well long enough for the longes request. The default value is 600 seconds, which is normally much longer than a http request should run. If the Timeout is set to 0, the watchdog is deactivated. Example MaxRequestTime 1200 MinThreads number Tntnet uses a dynamic pool of worker-threads, which wait for incoming requests. MinThreads specifies, how many worker threads there have to be. This defaults to 5. Example MinThreads 10 MinCompressSize number Http-compression for replies smaller than this are not compressed at all. The default value for this is 1024. Example MinCompressSize 256 MaxThreads number Tntnet uses a dynamic pool of worker-threads, which wait for incoming requests. MaxThreads limits the number of threads. The default is 100. Example MaxThreads 200 PidFile filename When run in daemon-mode, tntnet writes the process-id of the monitor-process to filename. When the monitor-process is deactivated, the pid of the worker-process is written. This ensures, that sending a sigkill to the the stored process-id stops tntnet. Example PidFile /var/run/tntnet.pid PropertyFile filename This directive specifies the property-file, where logging is configured. Example PropertyFile /etc/tntnet/tntnet.property QueueSize number Tntnet has a request-queue, where new requests wait for service. This sets a maximum size of this queue, after wich new requests are not accepted. The default value is 1000. Example QueueSize 50 SessionTimeout seconds This sets the number of seconds without requests after which a sesssion is erased. The default value is 300 seconds. Example SessionTimeout 600 SocketReadTimeout milliseconds A worker-thread waits for some milliseconds on incoming data. If there is no data, the job is put into a queue and another thread waits with poll(2) on incoming data on multiple sockets. The workerthreads are freed and they can respond to other requests quickly. The default value is 10 milliseconds, which is good for normal operation. A value of 0 results in non-blocking read. If timeout is reached, this does not mean, that the socket is closed. A small timeout reduces contextswitches on slow connections. Example SocketReadTimeout 0 SocketWriteTimeout milliseconds This defines the time, how long the workerthreads wait on write. If the timeout is exceeded, the socket is closed and the browser might not get all data. The default value is 10000 milliseconds. Example SocketWriteTimeout 20000 SslCertificate file Specifies the certificate-file for ssl-connections if not specified in SslListen SslKey file Specifies the certificate-key for ssl-connections if not specified in SslListen SslListen ip [port [ssl-certificate-file [ssl-key-file] ] ] Specifies, on which ip and port tntnet waits for incoming ssl-connections. Optionally a certificate- and key-file can be passed. Example SslListen 192.168.0.1 8443 ThreadStartDelay ms Example ThreadStartDelay 1000 User username Changes the user under which tntnet answers requests. Example User www-data VMapUrl host url component-identifier [ path-info { additional-arguments } ] This is like MapUrl, but is specific for the virtual host. This rule matches only if the host and the url matches against the specified values. Both are regular-expressions, so one rule can also match multiple hosts. Example # maps request for the host www1.tntnet.org to application1 VMapUrl www1.tntnet.org /([^/.]+) $1@application1 # maps request for the host www2.tntnet.org to application2 VMapUrl www2.tntnet.org /([^/.]+) $1@application2 # maps all calls to port 8000 to myapp VMapUrl .*:8000 /([^/.]+) $1@myapp AUTHOR
This manual page was written by Tommi Makitalo <tommi@tntnet.org>. SEE ALSO
tntnet(1) tntnet.properties(7). Tntnet 2006-08-13 tntnet.conf(7)
All times are GMT -4. The time now is 05:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy