Bonjour
J'ai un nouveau serveur: un xeon monoprocesseur :
Modèle CPU Intel® Xeon™ CPU 3.00GHz
Fréquence CPU 3000.67
Cache CPU 2048 KB
Bogomips CPU 11943.93
A priori pas trop mal sur le papier. Seulement voilà, je me retrouve avec les mêmes problèmes qu'avec mon ancien Pentium IV: pas trop de charge cpu (150 personnes en ligne sur le forum) mais un load average: 0.93 et aussi je trouve un nombre de tasks anormalement élevé.
4 à 5 fois chaque jour, alors que je n'ai pas plus de 250 personnes sur le forum, j'ai ce message d'erreur : "Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later."
Je demande votre aide pour des solutions d'optimisation. Le forum (SMF) est rapide, mais je ne m'explique pas les montée de load average.
Voici le résultat de mon TOP
top - 18:55:17 up 4 days, 4:25, 1 user, load average: 0.93, 0.61, 0.64
Tasks: 110 total, 1 running, 109 sleeping, 0 stopped, 0 zombie
Cpu(s): 9.5% us, 2.5% sy, 0.0% ni, 86.9% id, 1.0% wa, 0.0% hi, 0.2% si
Mem: 1035848k total, 528944k used, 506904k free, 11512k buffers
Swap: 2650684k total, 102108k used, 2548576k free, 294716k cached
Voici quelques uns de mes réglages:
apache 2 conf:
Timeout 30
# 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 1000
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
KeepAliveTimeout 15
##
## Server-Pool Size Regulation (MPM specific)
##
# 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
<IfModule prefork.c>
StartServers 15
MinSpareServers 5
MaxSpareServers 10
MaxClients 250
MaxRequestsPerChild 0
#StartServers 15
#MinSpareServers 10
#MaxSpareServers 15
#MaxClients 250
#MaxRequestsPerChild 200000
</IfModule>
# pthread MPM
# StartServers ......... initial number of server processes to start
# MaxClients ........... maximum number of server processes allowed to start
# 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 worker.c>
StartServers 10
MaxClients 250
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 100
MaxRequestsPerChild 100000
</IfModule>
# perchild MPM
# NumServers ........... constant number of server processes
# StartThreads ......... initial number of worker threads in each server process
# MinSpareThreads ...... minimum number of worker threads which are kept spare
# MaxSpareThreads ...... maximum number of worker threads which are kept spare
# MaxThreadsPerChild ... maximum number of worker threads in each server process
# MaxRequestsPerChild .. maximum number of connections per server process (then it dies)
<IfModule perchild.c>
NumServers 5
StartThreads 5
MinSpareThreads 5
MaxSpareThreads 100
MaxThreadsPerChild 100
MaxRequestsPerChild 100000
My?cnf
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 128K
#
# * Query Cache Configuration
#
query_cache_limit = 10485760
query_cache_size = 167772160
query_cache_type = 1
max_user_connections = 50
#
et dans php.ini (les réglages eaccelerator)
extension=mcrypt.so
extension=mysql.so
extension=gd.so
extension="eaccelerator.so"
eaccelerator.shm_size="32"
eaccelerator.cache_dir="/home/tmpfiles/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="0"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
J'ai un nouveau serveur: un xeon monoprocesseur :
Modèle CPU Intel® Xeon™ CPU 3.00GHz
Fréquence CPU 3000.67
Cache CPU 2048 KB
Bogomips CPU 11943.93
A priori pas trop mal sur le papier. Seulement voilà, je me retrouve avec les mêmes problèmes qu'avec mon ancien Pentium IV: pas trop de charge cpu (150 personnes en ligne sur le forum) mais un load average: 0.93 et aussi je trouve un nombre de tasks anormalement élevé.
4 à 5 fois chaque jour, alors que je n'ai pas plus de 250 personnes sur le forum, j'ai ce message d'erreur : "Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later."
Je demande votre aide pour des solutions d'optimisation. Le forum (SMF) est rapide, mais je ne m'explique pas les montée de load average.
Voici le résultat de mon TOP
top - 18:55:17 up 4 days, 4:25, 1 user, load average: 0.93, 0.61, 0.64
Tasks: 110 total, 1 running, 109 sleeping, 0 stopped, 0 zombie
Cpu(s): 9.5% us, 2.5% sy, 0.0% ni, 86.9% id, 1.0% wa, 0.0% hi, 0.2% si
Mem: 1035848k total, 528944k used, 506904k free, 11512k buffers
Swap: 2650684k total, 102108k used, 2548576k free, 294716k cached
Voici quelques uns de mes réglages:
apache 2 conf:
Timeout 30
# 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 1000
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
KeepAliveTimeout 15
##
## Server-Pool Size Regulation (MPM specific)
##
# 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
<IfModule prefork.c>
StartServers 15
MinSpareServers 5
MaxSpareServers 10
MaxClients 250
MaxRequestsPerChild 0
#StartServers 15
#MinSpareServers 10
#MaxSpareServers 15
#MaxClients 250
#MaxRequestsPerChild 200000
</IfModule>
# pthread MPM
# StartServers ......... initial number of server processes to start
# MaxClients ........... maximum number of server processes allowed to start
# 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 worker.c>
StartServers 10
MaxClients 250
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 100
MaxRequestsPerChild 100000
</IfModule>
# perchild MPM
# NumServers ........... constant number of server processes
# StartThreads ......... initial number of worker threads in each server process
# MinSpareThreads ...... minimum number of worker threads which are kept spare
# MaxSpareThreads ...... maximum number of worker threads which are kept spare
# MaxThreadsPerChild ... maximum number of worker threads in each server process
# MaxRequestsPerChild .. maximum number of connections per server process (then it dies)
<IfModule perchild.c>
NumServers 5
StartThreads 5
MinSpareThreads 5
MaxSpareThreads 100
MaxThreadsPerChild 100
MaxRequestsPerChild 100000
My?cnf
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 128K
#
# * Query Cache Configuration
#
query_cache_limit = 10485760
query_cache_size = 167772160
query_cache_type = 1
max_user_connections = 50
#
et dans php.ini (les réglages eaccelerator)
extension=mcrypt.so
extension=mysql.so
extension=gd.so
extension="eaccelerator.so"
eaccelerator.shm_size="32"
eaccelerator.cache_dir="/home/tmpfiles/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="0"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"