The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Useful information

Discussion in 'General Discussion' started by jaymc, Dec 4, 2005.

  1. jaymc

    jaymc Well-Known Member

    Joined:
    Jan 5, 2005
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    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 !!
     
  2. ShockHosts

    ShockHosts Well-Known Member

    Joined:
    Nov 25, 2005
    Messages:
    123
    Likes Received:
    0
    Trophy Points:
    16
    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?
     
  3. sunilkg

    sunilkg Member

    Joined:
    Aug 24, 2004
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    ---------------------------
    du -csh * |grep M

    du -csh * |grep G
    --------------------------
     
  4. jaymc

    jaymc Well-Known Member

    Joined:
    Jan 5, 2005
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    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
     
  5. vissa

    vissa Well-Known Member

    Joined:
    May 12, 2003
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    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
     
Loading...

Share This Page