Skocz do zawartości
krk151

Duże obciążenie ?

Polecane posty

Witam mój serwer coś strasznie muli udało mi się zalogować do Da i widzę coś takiego

 

httpd (pid 10577 12800 12839 12840 12843 12861 12869 12877 12882 12895 12922 12929 12938 12951 12952 12957 12958 12969 12970 12975 12998 12999 13009 13010 13017 13019 13029 13039 13040 13041 13043 13056 13057 13081 13082 13111 13112 13125 13128 13171 13173 13202 13203 13211 13222 13225 13235 13245 13246 13250 13259 13266 13267 13270 13271 13297 13304 13309 13314 13316 13318 13320 13322 13344 13356 13369 13377 13378 13379 13399 13400 13401 13402 13403 13407 13408 13409 13410 13411 13413 13423 13425 13428 13429 13437 13441 13442 13446 13449 13455 13457 13458 13465 13467 13468 13470 13471 13499 13501 13506 13507 13512 13513 13516 13524 13530 13535 13538 13546 13547 13548 13570 13571 13584 13585 13586 13589 13590 13597 13603 13604 13605 13626 13627 13631 13632 13637 13639 13671 13672 13673 13675 13678 13679 13680 13681 13686 13688 13695 13716 13717 13718 13731 13734 13735 13736 13790 13797 13800 13802 13803 13804 13805 13806 13815 13816 13817 13822 13828 13831 13835 13842 13845 13846 13847 13848 13849 13850 13854 13855 13856 13865 13866 13867 13871 13872 13873 13874 13877 13878 13888 13890 13891 13892 13893 13900 13901 13902 13915 13918 13919 13976 13977 13978 13993 13994 13995 14004 14106 14121 14122 14123 14126 14129 14131 14132 14135 14136 14137 14161 14168 14169 14170 14171 14172 14180 14181 14182 14184 14186 14189 14192 14248 14253 14254 14255 14260 14261 14276 14278 14279 14280 14282 14285 14287 14291 14292 14293 14297 14298 14299 14304 14305 14310 14311 14342 14345 14348 14377 14380 14383 14387 14392 14393 14394 14395 14396 14397 14398 14399 14400 )

Udostępnij ten post


Link to postu
Udostępnij na innych stronach

Teraz jest Load Average6.27, 37.46, 36.66

 

Jak sprawdzić co generuje takie obciążenie

 

Teraz jest Load Average6.27, 37.46, 36.66

 

Jak sprawdzić co generuje takie obciążenie

 

i znowu się zaczyna

 

httpd (pid 25347 25963 25967 25968 25969 25985 25986 25998 25999 26000 26003 26004 26051 26056 26057 26058 26108 26114 26124 26125 26126 26127 )

Udostępnij ten post


Link to postu
Udostępnij na innych stronach

Pokaż swoje pliki konfiguracyjne i pochwal się jaki ruch generują Twoje strony.

Daj wynik tego:

cat /etc/httpd/conf/extra/httpd-default.conf

cat /etc/httpd/conf/extra/httpd-mpm.conf

 

-bash: htop: command not found

Nie masz htop. Jeżeli używasz debiana/ubuntu lub innego korzystającego z biblioteki APT wklep sobie komendę

apt-get install htop

.

Jeżeli używasz czegoś pokroju RedHat , CentOS, Fedora to wklej up2date(dla staruszków/yum install htop.

 

no ( ;) )

Udostępnij ten post


Link to postu
Udostępnij na innych stronach

s1:~# cat /etc/httpd/conf/extra/httpd-default.conf
#
# This configuration file reflects default settings for Apache HTTP Server.
#
# You may change these, but chances are that you may not need to.
#

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 60

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
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 40

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

#
# UseCanonicalName: Determines how Apache constructs self-referencing
# URLs and the SERVER_NAME and SERVER_PORT variables.
# When set "Off", Apache will use the Hostname and Port supplied
# by the client.  When set "On", Apache will use the value of the
# ServerName directive.
#
UseCanonicalName Off

#
# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives.  See also the AllowOverride
# directive.
#
AccessFileName .htaccess

#
# ServerTokens
# This directive configures what you return as the Server HTTP response
# Header. The default is 'Full' which sends information about the OS-Type
# and compiled in modules.
# Set to one of:  Full | OS | Minor | Minimal | Major | Prod
# where Full conveys the most information, and Prod the least.
#
ServerTokens Prod

#
# Optionally add a line containing the server version and virtual host
# name to server-generated pages (internal error documents, FTP directory
# listings, mod_status and mod_info output etc., but not CGI generated
# documents or custom error documents).
# Set to "EMail" to also include a mailto: link to the ServerAdmin.
# Set to one of:  On | Off | EMail
#
ServerSignature Off

#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off

 

s1:~# cat /etc/httpd/conf/extra/httpd-mpm.conf
#
# Server-Pool Management (MPM specific)
#

#
# PidFile: The file in which the server should record its process
# identification number when it starts.
#
# Note that this is the default PidFile for most MPMs.
#
<IfModule !mpm_netware_module>
 PidFile "/var/run/httpd.pid"
</IfModule>

#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
<IfModule !mpm_winnt_module>
<IfModule !mpm_netware_module>
LockFile /var/logs/accept.lock
</IfModule>
</IfModule>

#
# Only one of the below sections will be relevant on your
# installed httpd.  Use "apachectl -l" to find out the
# active mpm.
#

# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves

ServerLimit 1024

<IfModule mpm_prefork_module>
 StartServers		  5
 MinSpareServers	   5
 MaxSpareServers	  10
 MaxClients		  512
 MaxRequestsPerChild  20
</IfModule>

# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_worker_module>
 StartServers		  2
 MaxClients		  150
 MinSpareThreads	  25
 MaxSpareThreads	  75
 ThreadsPerChild	  25
 MaxRequestsPerChild   0
</IfModule>

# BeOS MPM
# StartThreads: how many threads do we initially spawn?
# MaxClients:   max number of threads we can have (1 thread == 1 client)
# MaxRequestsPerThread: maximum number of requests each thread will process
<IfModule mpm_beos_module>
 StartThreads			10
 MaxClients			  50
 MaxRequestsPerThread 10000
</IfModule>

# NetWare MPM
# ThreadStackSize: Stack size allocated for each worker thread
# StartThreads: Number of worker threads launched at server startup
# MinSpareThreads: Minimum number of idle threads, to handle request spikes
# MaxSpareThreads: Maximum number of idle threads
# MaxThreads: Maximum number of worker threads alive at the same time
# MaxRequestsPerChild: Maximum  number of requests a thread serves. It is
#					  recommended that the default value of 0 be set for this
#					  directive on NetWare.  This will allow the thread to
#					  continue to service requests indefinitely.			   
<IfModule mpm_netware_module>
 ThreadStackSize	  65536
 StartThreads		   250
 MinSpareThreads		 25
 MaxSpareThreads		250
 MaxThreads			1000
 MaxRequestsPerChild	  0
 MaxMemFree			 100
</IfModule>

# OS/2 MPM
# StartServers: Number of server processes to maintain
# MinSpareThreads: Minimum number of idle threads per process,
#				  to handle request spikes
# MaxSpareThreads: Maximum number of idle threads per process
# MaxRequestsPerChild: Maximum number of connections per server process
<IfModule mpm_mpmt_os2_module>
 StartServers		   2
 MinSpareThreads		5
 MaxSpareThreads	   10
 MaxRequestsPerChild	0
</IfModule>

Udostępnij ten post


Link to postu
Udostępnij na innych stronach

StartServers 15

MinSpareServers 20

MaxSpareServers 30

MaxClients 512

MaxRequestsPerChild 1000

Klepnij coś takiego, strzelam oczywiście bo nie mam dostępu do Twojego serwera i nie wiem jaki generujesz ruch/ jakiego typu etc...

Oprócz tego możesz powiększyć ilość MaxKeepAliveRequests, albo całkowicie wyłączyć KeepAlive :-))

Udostępnij ten post


Link to postu
Udostępnij na innych stronach

zrobiłem tak jak kazałeś i zainstalowałem htop i pokazuje

CPU 100%

MEM 430/1005

 

i pokazuje, że apache zjada całego CPU

Udostępnij ten post


Link to postu
Udostępnij na innych stronach

masz php w fcgi zrobioną ?

Udostępnij ten post


Link to postu
Udostępnij na innych stronach

Mi to wygląda na mod_php.

Spróbuj dokompilować np. eaccelerator.

Udostępnij ten post


Link to postu
Udostępnij na innych stronach

Bądź aktywny! Zaloguj się lub utwórz konto

Tylko zarejestrowani użytkownicy mogą komentować zawartość tej strony

Utwórz konto

Zarejestruj nowe konto, to proste!

Zarejestruj nowe konto

Zaloguj się

Posiadasz własne konto? Użyj go!

Zaloguj się


×