jaymc

Well-Known Member
Jan 5, 2005
100
0
166
I'm not sure how useful this will be to you, but for me it was part of my 5 month nightmare... which nearly led me to buying a new top spec server for £1000+ when it wasnt needed

Basically i run a very very busy website, which uses a lot of MYSQL and has a lot of downloads... Now when their were a lot of users online pages on the server could take as long as 15 seconds to load.. i began tweakin MYSQL and APACHE confs to improve performance... Didnt work

i invesigated hardware, again no really problem...

Finally i came to the conclusion it was MYSQL and disk access time.. so i bought a SCSI drive 15K... their was slight improvement, but only by an extra few seconds..

In the end, it turned out to be CLUTTERED LOG FILES !!

Now by default apache will log every HTTP request into a single file located in DOMLOGS dir... my site was that busy that over time that log file had acumulated to 2.5GIG, so in other words, ever click, ever request made, the server had to open that hurendous file, dump a line of data into it, and close

imagine that happening 1000 times a second, on top of all the other processes!

The trick was, it doesnt really effect HARDWARE performance, so TOP etc produced no noticeable results.. !

I have no disabled all logs and the server runs as any other would, regardless of peaks !!

I just thought this was really interesting, and just goes to show that even the biggest problem with the most amount of research can have even the simplest solutions

And to any of you who had logs enabled, you may want to check the size of them...

du -sh * |grepM

run that command in the domlogs DIR and see what you get

or in my case... du -sh * |grepG !!
 

ShockHosts

Well-Known Member
Nov 25, 2005
123
0
166
As you said 'Useful Information'.... It is quite funny as well! :)

One question, I'm not good with decoding these commands...

Would the command be exactly like that? Or does the star change to something for each system?
 

sunilkg

Member
Aug 24, 2004
22
0
151
---------------------------
du -csh * |grep M

du -csh * |grep G
--------------------------
 

jaymc

Well-Known Member
Jan 5, 2005
100
0
166
FlamingHostCEO said:
As you said 'Useful Information'.... It is quite funny as well! :)

One question, I'm not good with decoding these commands...

Would the command be exactly like that? Or does the star change to something for each system?
the star is a WILD CARD... basically means search for all files, not a specific one

do this in SSH

CD /usr/local/apache/domlogs
du -sh * |grepM
 

vissa

Well-Known Member
May 12, 2003
46
0
156
Sorry for bringing up an old thread, but it was relavent.

What if the domlogs (log files) were put on a drive other than the main drive that MYSQL uses? Like the backup drive? I have thought about trying that. The 2GB limit is a well known problem for linux/cpanel that causes apache to slow to a crawl.

-vissa