|
|
|
![]() |
|
Strumenti |
![]() |
#1 |
Senior Member
Iscritto dal: Apr 2003
Città: Rimini
Messaggi: 3970
|
WebServer lentissimo : Da cosa può essere dovuto se....?
Dopo circa 10 giorni di up, 1 mio webserver (debian woody) in cui gira apache+php+mysql ed anke qmail+vpopmail è diventato lentissimo. Per accedere al sito (dominio) principale (che occupa il 90% della banda totale usata da tutti i domini nonchè provoca il 90% degli accessi totale) ci metto un casino ED ogni query al db me la risolve in troppo tempo.
Controllando tramite il comando "TOP" vedo ke la cpu sta mediamente sul 90% in idle e la ram libera varia da 5 ai 15Mb (swappa cmq pokissimo). Il sito, x rendere l'idea, ha 1 media d 10.000 accessi al giorno. SE riavvio la macchina TUTTO ritorna veloce come all'inizio. Qlc ha idea di quale potrebbe essere la causa di tutto ciò ? TNK
__________________
Powered by Apple Macbook Pro Retina |
![]() |
![]() |
![]() |
#2 |
Senior Member
Iscritto dal: Oct 2003
Città: Turin
Messaggi: 746
|
potrebbe essere l'accesso ai dischi ?
cmq se come dici tu swappa pochissimo.. il fatto già sl che swappi non è bene... in che condizioni hai fatto i test ?
__________________
LiNUX User: 371384 "Bort_83 @ jabber.linux.it" LaKRiKKADiBoRT_SeTi@HoMe_GRouP .:: Vendo Cerchioni in lega peugeot 205 GT, 309 GT, 405, 106 Rally + Pirelli P600 185/55R16 ::. |
![]() |
![]() |
![]() |
#3 |
Senior Member
Iscritto dal: Aug 2001
Città: Mo-To
Messaggi: 1203
|
hai guardato se non ha fatto dei log kilometrici?
e sopratutto lo swapping non ci dovrebbe essere.... |
![]() |
![]() |
![]() |
#4 | |||
Senior Member
Iscritto dal: Apr 2003
Città: Rimini
Messaggi: 3970
|
Quote:
Quote:
Quote:
__________________
Powered by Apple Macbook Pro Retina |
|||
![]() |
![]() |
![]() |
#5 | ||
Senior Member
Iscritto dal: Apr 2003
Città: Rimini
Messaggi: 3970
|
Quote:
Quote:
__________________
Powered by Apple Macbook Pro Retina |
||
![]() |
![]() |
![]() |
#6 |
Senior Member
Iscritto dal: Jan 2002
Città: Imola
Messaggi: 1116
|
A che livello di log hai impostato Apache?
Di solito si mette warning Che ver di Apache? |
![]() |
![]() |
![]() |
#7 | |
Senior Member
Iscritto dal: Apr 2003
Città: Rimini
Messaggi: 3970
|
Quote:
Apache 1.3.26 (quello fornito dalla debian woody)
__________________
Powered by Apple Macbook Pro Retina |
|
![]() |
![]() |
![]() |
#8 | |
Senior Member
Iscritto dal: Jan 2002
Città: Imola
Messaggi: 1116
|
Quote:
Cmq se il problema sembra essere solo Apache... Come hai impostato il numero di processi minimi, massimi e quelli in attesa di connessione? |
|
![]() |
![]() |
![]() |
#9 | |
Senior Member
Iscritto dal: Jan 2002
Città: Imola
Messaggi: 1116
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#10 | ||
Senior Member
Iscritto dal: Apr 2003
Città: Rimini
Messaggi: 3970
|
Quote:
Potrebbe anke essere un problema d rete ovvero troppo traffico che intasa la macchina... Boh, faccio ipotesi.... Quote:
MaxKeepAliveRequests 200 KeepAliveTimeout 15 MinSpareServers 10 MaxSpareServers 25 StartServers 2 MaxClients 150 MaxRequestsPerChild 10000 Penso d averti dato tutte le info a riguardo del httpd.conf
__________________
Powered by Apple Macbook Pro Retina |
||
![]() |
![]() |
![]() |
#11 | |
Senior Member
Iscritto dal: Aug 2001
Città: Mo-To
Messaggi: 1203
|
Quote:
sto MaxRequestPerChild mi sembra troppo esagerata... tu hai 10.000 visite per giorno vero? e tu dici ad un figlio di prendersi al max 10.000 richieste?!?!? ti conviene diminuire quella cifra.... poi ti consiglierei di provare per esclusioni...ovvero per un giorno fai meno logs...e vedi se le performance giran meglio se no procedi per altri motivi. Ovvio che sto mettendo le soluzioni nel caso sia Apache il colpevole... prova a fare qualche richiesta al server e vedere come ti risponde... ovvero. Pagina HTML normale? Pagina PHP? Pagina con query Sql...etcetc...cosi' vedi se c'e' qualche collo di bottiglia ![]() Purtroppo in era di internet bisogna cercare procedendo per esclusione... ciao e buon lavoro |
|
![]() |
![]() |
![]() |
#12 |
Senior Member
Iscritto dal: Oct 2003
Città: Turin
Messaggi: 746
|
e invece per quanto riguarda la rete.. esistono diverse applett per i desktop grafici che fanno grafici sul carico di rete...
da shell nn saprei... ma di sicuro esiste qualcosa... al max prova a vedere facendo dei ping... ... cmq sia per quanto riguarda lo swap.. sicuramente anke solo swappare di poco.. rallenta.. soprattuto se già dici che deve scrivere 1 Mb di log al minuto...
__________________
LiNUX User: 371384 "Bort_83 @ jabber.linux.it" LaKRiKKADiBoRT_SeTi@HoMe_GRouP .:: Vendo Cerchioni in lega peugeot 205 GT, 309 GT, 405, 106 Rally + Pirelli P600 185/55R16 ::. |
![]() |
![]() |
![]() |
#13 | |
Senior Member
Iscritto dal: Apr 2003
Città: Rimini
Messaggi: 3970
|
Quote:
1) Bloccare da firewall l'icmp può aiutare ? 2) Come faccio x dirgli d non swappare ?
__________________
Powered by Apple Macbook Pro Retina |
|
![]() |
![]() |
![]() |
#14 | |
Senior Member
Iscritto dal: Aug 2001
Città: Mo-To
Messaggi: 1203
|
Quote:
2) credo ceh ci sia una opzione Noswap. da www.apache.org Sites which need to serve more than 256 simultaneous requests may need to increase MaxClients, while sites with limited memory may need to decrease MaxClients to keep the server from thrashing (swapping memory to disk and back). The single biggest hardware issue affecting webserver performance is RAM. A webserver should never ever have to swap, as swapping increases the latency of each request beyond a point that users consider "fast enough". This causes users to hit stop and reload, further increasing the load. You can, and should, control the MaxClients setting so that your server does not spawn so many children it starts swapping. The procedure for doing this is simple: determine the size of your average Apache process, by looking at your process list via a tool such as top, and divide this into your total available memory, leaving some room for other processes. Setting MaxRequestsPerChild to a non-zero limit has two beneficial effects: * it limits the amount of memory that process can consume by (accidental) memory leakage; * by giving processes a finite lifetime, it helps reduce the number of processes when the server load reduces. ti ho riportato i vari motivi... quanta memoria hai sul computer? 5-15 mb liberi di ram mi paiono davvero pochi.....fossi in te andrei sui 50 mb liberi.... per precauzione ![]() |
|
![]() |
![]() |
![]() |
#15 |
Senior Member
Iscritto dal: Apr 2003
Città: Rimini
Messaggi: 3970
|
Ho 512Mb...
__________________
Powered by Apple Macbook Pro Retina |
![]() |
![]() |
![]() |
Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 12:02.