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.

sites are slow

Discussion in 'General Discussion' started by vishal, Nov 8, 2003.

  1. vishal

    vishal Well-Known Member

    Joined:
    Jan 28, 2003
    Messages:
    340
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    Hello All,

    I m having a issue on the server

    The client complaints that sites are running slow.

    I have checked the ping, traceroute and they seem to be ok.

    Also these sites uses a high bandwidth on the server as i always see them marked Red or Orange when i view the bandwidth Status.

    Could any body of u suggest me how do i investigate why the sites are slow.

    There is no emails traffic on the server. I have only 10 sites on the server and the configuration is :

    Processor Info

    Processor #1 Vendor: GenuineIntel
    Processor #1 Name: Intel(R) Pentium(R) III CPU family 1133MHz
    Processor #1 speed: 1137.482 MHz
    Processor #1 cache size: 512 KB


    Memory Information
    Memory: 511708k/524224k available (1175k kernel code, 9952k reserved, 986k data, 116k init, 0k highmem)

    Physical Drives
    hda: WDC WD400BB-75CAA0, ATA DISK drive
    hdb: WDC WD400BB-75CAA0, ATA DISK drive
    hda: attached ide-disk driver.
    hda: host protected area => 1
    hda: setmax LBA 78125040, native 78125000
    hda: 78125000 sectors (40000 MB) w/2048KiB Cache, CHS=77504/16/63, UDMA(100)
    hdb: attached ide-disk driver.
    hdb: host protected area => 1
    hdb: setmax LBA 78125040, native 78125000
    hdb: 78125000 sectors (40000 MB) w/2048KiB Cache, CHS=4863/255/63, UDMA(100)


    Current Memory Usage
    total used free shared buffers cached
    Mem: 514120 462264 51856 0 118952 93144
    -/+ buffers/cache: 250168 263952
    Swap: 1052216 218900 833316
    Total: 1566336 681164 885172


    Current Disk Usage
    Filesystem Size Used Avail Use% Mounted on
    /dev/hda5 1.9G 563M 1.2G 31% /
    /dev/hdb1 37G 29G 5.8G 84% /backup
    /dev/hda1 45M 23M 20M 53% /boot
    /dev/hda7 22G 3.0G 18G 15% /home
    none 251M 0 251M 0% /dev/shm
    /dev/hda3 5.8G 5.5G 0 100% /usr
    /dev/hda2 5.8G 249M 5.2G 5% /var


    Thank you,
     
    #1 vishal, Nov 8, 2003
    Last edited: Nov 9, 2003
  2. NeutralGold

    NeutralGold Well-Known Member

    Joined:
    Jun 5, 2002
    Messages:
    233
    Likes Received:
    0
    Trophy Points:
    16
    Maybe it's him, if he's located pretty far away, thats definatly a problem. I tested the sites and they performed rather smooth and quickly..
     
  3. NeutralGold

    NeutralGold Well-Known Member

    Joined:
    Jun 5, 2002
    Messages:
    233
    Likes Received:
    0
    Trophy Points:
    16
    P.S. you should not list your clients domain names.
     
  4. vishal

    vishal Well-Known Member

    Joined:
    Jan 28, 2003
    Messages:
    340
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    Thanks for the info but i couldnt help it though i have removed the names from my post. But this is something where in i need to put the sites name else it does not help other to see what the issue is.

    Thank you again.
     
  5. Game Wizards

    Game Wizards Active Member

    Joined:
    Apr 6, 2003
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    I presume your /etc/resolv.conf is setup correctly? :confused:
     
  6. vishal

    vishal Well-Known Member

    Joined:
    Jan 28, 2003
    Messages:
    340
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    Hey Thanks !

    I think that has made the Trick. :D, I feel the sites are running quite fast, but lets us wait and see what the client says abt it.

    Thanks again
     
  7. vishal

    vishal Well-Known Member

    Joined:
    Jan 28, 2003
    Messages:
    340
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    Sorry but the Site is slow again :(

    Here is my Server Config :

    processor : 0
    vendor_id : GenuineIntel
    cpu family : 6
    model : 11
    model name : Intel(R) Pentium(R) III CPU family 1133MHz
    stepping : 1
    cpu MHz : 1137.478
    cache size : 512 KB
    physical id : 0
    siblings : 1
    fdiv_bug : no
    hlt_bug : no
    f00f_bug : no
    coma_bug : no
    fpu : yes
    fpu_exception : yes
    cpuid level : 2
    wp : yes
    flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse
    bogomips : 2267.54

    processor : 1
    vendor_id : GenuineIntel
    cpu family : 6
    model : 11
    model name : Intel(R) Pentium(R) III CPU family 1133MHz
    stepping : 1
    cpu MHz : 1137.478
    cache size : 512 KB
    physical id : 0
    siblings : 1
    fdiv_bug : no
    hlt_bug : no
    f00f_bug : no
    coma_bug : no
    fpu : yes
    fpu_exception : yes
    cpuid level : 2
    wp : yes
    flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse
    bogomips : 2274.09

    1 GB RAM
    DUAL Processor.

    Here are steps i took for the site to load faster ...

    1. I found that domlogs for that sites grows to a large size so i manage to Rotate the domlogs.
    2. The site uses Mysql heavily so i tuned my.cnf, setting various values for the Mysql variables.

    After doing the above steps the site was fast for 3 days but again it started to load slowly. Also after tunning my.cnf each mysql process took 2.0 cpu load and i have around 10 processes that are continously running in the background for that site's mysql. So i removed the variables from my.cnf and now the mysql processes took 0.x cpu load. Now the only variable i have in my.cnf is
    max-connections=500

    I have done a lot of search for the site to load faster but nothing worked.

    Here is the Mysql process that consuming the Memory now :

    root 9014 0.0 0.1 2204 1052 pts/2 S 13:30 0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-file=/var/lib/mysql/server.server.com.pid
    mysql 9037 0.0 1.5 39872 15756 pts/2 S 13:30 0:02 \_ /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/server.server.com.pid --skip-locking
    mysql 9039 0.0 1.5 39872 15756 pts/2 S 13:30 0:02 \_ /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/server.server.com.pid --skip-locking
    mysql 9040 0.0 1.5 39872 15756 pts/2 S 13:30 0:00 \_ /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/server.server.com.pid --skip-locking
    mysql 9041 0.0 1.5 39872 15756 pts/2 S 13:30 0:00 \_ /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/server.server.com.pid --skip-locking
    mysql 9042 0.0 1.5 39872 15756 pts/2 S 13:30 0:00 \_ /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/server.server.com.pid --skip-locking
    mysql 9043 0.0 1.5 39872 15756 pts/2 S 13:30 0:00 \_ /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/server.server.com.pid --skip-locking
    mysql 9044 0.0 1.5 39872 15756 pts/2 S 13:30 0:00 \_ /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/server.server.com.pid --skip-locking
    mysql 9045 0.0 1.5 39872 15756 pts/2 S 13:30 0:01 \_ /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/server.server.com.pid --skip-locking
    mysql 9046 0.0 1.5 39872 15756 pts/2 S 13:30 0:00 \_ /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/server.server.com.pid --skip-locking
    mysql 9047 0.0 1.5 39872 15756 pts/2 S 13:30 0:00 \_ /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/server.server.com.pid --skip-locking
    mysql 31948 0.0 1.5 39872 15756 pts/2 S 14:26 0:00 \_ /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/server.server.com.pid --skip-locking
    mysql 31949 0.0 1.5 39872 15756 pts/2 R 14:26 0:00 \_ /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/server.server.com.pid --skip-locking


    Any comments / Suggetions will be appreciated.

    Thank you,
    :confused: :eek: :mad: :(
     
    #7 vishal, Dec 4, 2003
    Last edited: Dec 4, 2003
  8. TheSpidre

    TheSpidre Active Member

    Joined:
    Mar 10, 2003
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    I'm curious about this aswell..

    Anyone?
     
  9. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    From the first post, these are the two things that caught my eye and are directly related to the Server slowness:

    Processor #1 Name: Intel(R) Pentium(R) III CPU family 1133MHz

    - it's not unreasonable to expect a PIII is unable to quickly handle the number of mySQL calls without some modifications to Apache (httpd.conf) and mySQL (.my.cnf).


    /dev/hda3 5.8G 5.5G 0 100% /usr

    - this is bad, no matter anything else.
     
  10. vishal

    vishal Well-Known Member

    Joined:
    Jan 28, 2003
    Messages:
    340
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    I m sorry abt /usr 100% but i have cleared the occupied space after i saw the space usage. But now the situation is Worst. I have to reboot the server at least once in a day.
    Mysql is consuming hell lot of CUP and i cant do anyhting except optimizing my.cnf. Which i already did :(

    Any else i can do ?????

    Thanks,
     
  11. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    Have you checked: tail -f /usr/local/apache/logs/error_log
    to make sure errors are at minimum?

    I would also do some traceroute testing from various free places on the Net and compare speeds. Always helps to get a 2nd or 3rd opinion. ;)
     
  12. vishal

    vishal Well-Known Member

    Joined:
    Jan 28, 2003
    Messages:
    340
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    Yup I have checked the error-logs i get all file does not exists errors which are normal.

    The Sites are Fast now, since i optimized the my.cnf the load got distributed on no. of threads and the sites are quite fast now :)

    But suddenly the load goes up and the server goes to a unstable mode and i need to reboot.

    Thanks,
     
  13. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    Does your .my.cnf file still only have:

    max-connections=500
     
  14. vishal

    vishal Well-Known Member

    Joined:
    Jan 28, 2003
    Messages:
    340
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    I have the following settings in my.cnf. Which started loading the sites faster. but have to reboot the server once in a day.

    [mysqld]
    max_connections = 500
    key_buffer = 16M
    myisam_sort_buffer_size = 32M
    join_buffer_size = 1M
    read_buffer_size = 1M
    sort_buffer_size = 1M
    table_cache = 1500
    thread_cache_size = 32
    wait_timeout = 100
    interactive_timeout=100
    connect_timeout = 10
    max_allowed_packet = 16M
    max_connect_errors = 10
    thread_concurrency=4
    query_cache_limit = 1M
    query_cache_size = 16M
    query_cache_type = 1
    skip-innodb


    [mysqld_safe]
    err-log=/var/log/mysqld.log
    open_files_limit = 8192

    [mysqldump]
    quick
    max_allowed_packet = 16M

    [isamchk]
    key_buffer=64M
    sort_buffer=64M
    read_buffer=16M
    write_buffer=16M

    [myisamchk]
    key_buffer = 64M
    sort_buffer = 64M
    read_buffer = 16M
    write_buffer = 16M

    Thanks,
     
  15. Finkinstein

    Finkinstein Well-Known Member

    Joined:
    Mar 21, 2003
    Messages:
    131
    Likes Received:
    0
    Trophy Points:
    16
    I am having a VERY similar issue.. and, I am pretty sure a LOT of people are!

    If anyone else has similar issues please post below so I can see if its not just us two.

    I've had constant mysql issues for about 2 months and what ever I try, no resolution!
     
  16. ptez

    ptez Active Member

    Joined:
    Jun 5, 2003
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    This is quite annoying... I also have this kinda issue as well.

    Suddenly, MySQL used out all the resource, and if you restart httpd or restart the server, it will be ok.

    But you then have to that daily....

    Anyone has any good solutions for this?
     
  17. zye

    zye Well-Known Member

    Joined:
    Dec 6, 2002
    Messages:
    96
    Likes Received:
    1
    Trophy Points:
    8
    i have the same issue here :-(

    after restart of mysqld - i have 10 mysqld processes started
    root 17266 0.0 0.0 4492 936 pts/0 S 11:53 0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --pid-fil
    mysql 17286 0.0 2.2 51172 22848 pts/0 S 11:53 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=my
    mysql 17288 0.0 2.2 51172 22848 pts/0 S 11:53 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=my
    mysql 17289 0.0 2.2 51172 22848 pts/0 S 11:53 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=my
    mysql 17290 0.0 2.2 51172 22848 pts/0 S 11:53 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=my
    mysql 17291 0.0 2.2 51172 22848 pts/0 S 11:53 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=my
    mysql 17292 0.0 2.2 51172 22848 pts/0 S 11:53 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=my
    mysql 17295 0.0 2.2 51172 22848 pts/0 S 11:53 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=my
    mysql 17296 0.0 2.2 51172 22848 pts/0 S 11:53 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=my
    mysql 17297 0.0 2.2 51172 22848 pts/0 S 11:53 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=my
    mysql 17298 0.0 2.2 51172 22848 pts/0 S 11:53 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=my

    which is strange

    suddenly mysqld spawns a lot of processes 50+ which cause extreme server load

    is there any variable inside my.cnf which can limit the amount of processes started by mysqld ?

    after restart of mysqld everything back to normal

    this occurs about 2 - 4 times a day for the last 2 weeks - could not find the cause though

    help would be appreciated
     
Loading...

Share This Page