Results 1 to 18 of 18

Thread: Do I need RAM?

  1. #1
    Join Date
    Mar 2005
    Posts
    56

    Do I need RAM?

    My website was working fine, top speed, less CPU usage etc. However, recently I have had an increase in my traffic and now my website appears to load slow and my CPU is high most of the time. What could the problem be that is causing the slow load? Would I need RAM? How would I check if I need RAM or not?

    Thanks

  2. #2
    Run free -m. If you are swapping a lot you should probably add some more RAM. Thats as good a guess I can give you without knowing a little more, like your server specs, your OS, and how your website delivers content (static or via php/mysql)?


    Alex

  3. #3
    vmstat or top come to mind.

  4. #4
    RAM is important for loading processes, especially if you're using server-side scripting like PHP, CGI, etc. Though if the CPU usage is high i would consider upgrading the processor too

  5. #5
    Join Date
    Jul 2003
    Location
    Goleta, CA
    Posts
    5,566
    If you need more RAM you might as well get a faster harddrive so the transition from disk to memory is faster.

  6. #6
    Join Date
    Mar 2005
    Posts
    56
    >> free -m
    total used free shared buffers cached
    Mem: 1010 463 546 0 5 88
    -/+ buffers/cache: 369 640
    Swap: 2000 556 1443
    My server specs are:
    Processor Information

    Processor #1 Vendor: GenuineIntel
    Processor #1 Name: Intel(R) Xeon(TM) CPU 2.80GHz
    Processor #1 speed: 2801.543 MHz
    Processor #1 cache size: 2048 KB

    Processor #2 Vendor: GenuineIntel
    Processor #2 Name: Intel(R) Xeon(TM) CPU 2.80GHz
    Processor #2 speed: 2801.543 MHz
    Processor #2 cache size: 2048 KB

    Processor #3 Vendor: GenuineIntel
    Processor #3 Name: Intel(R) Xeon(TM) CPU 2.80GHz
    Processor #3 speed: 2801.543 MHz
    Processor #3 cache size: 2048 KB

    Processor #4 Vendor: GenuineIntel
    Processor #4 Name: Intel(R) Xeon(TM) CPU 2.80GHz
    Processor #4 speed: 2801.543 MHz
    Processor #4 cache size: 2048 KB
    The pages run 100% through PHP/MySQL -- what do you guys think the problem can be? I'm experiencing real slow load time.

  7. #7
    Yeah, you need to add more RAM. You're using about 2GB of SWAP, so you need at least another 1GB stick of RAM. Is this just one website on this server? If so, you may want to think about setting up some basic load balancing, with apache, mail, dns1, etc on one server and mysql and dns2 on the second server.


    Alex

  8. #8
    Join Date
    Mar 2005
    Posts
    56
    Hello adb22791, I am real thankful for your advice. There is only 1 website hosted on the server. The thing is, I am newbie at this server management thing. If you can point me to the right direction of doing what you said then i'd appreciate that.

  9. #9
    You defently need more ram.
    at least 1GB more

  10. #10
    Join Date
    Apr 2006
    Location
    Leicestershire, UK
    Posts
    234
    How many users online at once are we talking here ?
    That is a lot of swap being used but you still have 640MB free RAM.
    Maybe a faulty RAM Module ?
    www.NT-Hosts.net
    Shared Hosting - Reseller - Email Hosting - Forum Hosting - Linux server admins
    Phone: 07092898178 - Fax: 07092898179 - Email:Sales@NT-Hosts.net

  11. #11
    Join Date
    Mar 2005
    Posts
    56
    Every 5 minute there are on average 80 different IPs on the server. Each user uses 10-30 queries per visit.

  12. #12
    Join Date
    May 2002
    Location
    Kansas City, USA
    Posts
    75
    Looks like a pretty good box. My question would be, if you are running Linux, what kernel are you running. If you aren't running the proper kernel you won't be taking advantage of all those CPU's
    Midwest Dedicated
    Content Management Solutions, Design, Managed Servers
    http://www.midwestdedicated.com
    Providing the highest quality IT services since 1999.

  13. #13
    Join Date
    Mar 2005
    Posts
    56
    How would I go about finding what kernel I am using?
    Webmaster Tools at iWEBTOOL.com

  14. #14
    I'm going to guess it's a stock kernel. You can find the version by typing:
    Code:
    uname -r
    in shell.


    Alex

  15. #15
    Join Date
    Mar 2005
    Posts
    56
    >>uname -r
    2.6.9-34.ELsmp
    Which kernel is the most appropiate for the box?
    Webmaster Tools at iWEBTOOL.com

  16. #16
    Not that one. You should update. That kernel has a problem with memory management that looks just like what you posted above. If all the ram isn't being used, it shouldn't be digging into swap like it is. Your only using half the ram and another 500mb swap. Not good.

  17. #17
    Join Date
    Mar 2005
    Posts
    56
    How would I update?

  18. #18
    Quickest way is ask the data center to do it. If they won't you could hire someone. Or try it yourself.

    If it's centos 4, which it probably is judging by that stock kernel, and cpanel, go to /etc/yum.conf and remove "kernel" so the line look like this:

    exclude=courier* mysql* spamassassin* httpd* perl mysql* squirrelmail* php* mod_ssl* exim* pure-ftpd* proftpd*

    All the steps:

    pico /etc/yum.conf

    (remove "kernel")

    ctrl+o
    ctrl+x

    then type:
    yum update

    answer "y" to any questions

    when its finished reboot
    shutdown -r now

    Find religion and pray it comes back up. If it does, add kernel back to the config file so it doesn't update every time you use yum update.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •