Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2002
    Posts
    75

    Do I need more RAM?

    Hi I'm running a dual xeon with 2GB RAM for this dedicated mysql server. Would appreciate any advice if I need more RAM to improve performance and reduce CPU load? My my.cnf configuration is very well optimised already. Thanks.

    The following is my top results during PEAK time.

    23:24:16 up 3 days, 3:08, 1 user, load average: 32.59, 24.26, 21.91
    51 processes: 49 sleeping, 2 running, 0 zombie, 0 stopped
    CPU states: cpu user nice system irq softirq iowait idle
    total 88.0% 0.0% 10.4% 0.0% 0.3% 0.0% 0.9%
    cpu00 89.6% 0.0% 8.9% 0.1% 0.1% 0.0% 0.9%
    cpu01 93.8% 0.0% 4.6% 0.0% 0.0% 0.0% 1.6%
    cpu02 78.4% 0.0% 18.7% 0.1% 1.3% 0.0% 1.1%
    cpu03 90.4% 0.0% 9.3% 0.0% 0.1% 0.0% 0.0%
    Mem: 2075964k av, 1880416k used, 195548k free, 0k shrd, 28328k buff
    1775528k active, 72636k inactive
    Swap: 2040244k av, 10992k used, 2029252k free 639152k cached

  2. #2
    Join Date
    Nov 2003
    Location
    Canada
    Posts
    881
    No, that load looks perfectly fine. You have nearly 200MB free right now and only about 10MB of swap used. As long as swap usage stays low like that then you are fine. Although note a better way to check on ram usage is with the command: free -m

  3. #3
    Join Date
    Mar 2005
    Location
    Cardiff, Wales, UK
    Posts
    45
    Actually, you've got more than 200Mb free - the linux kernel caches all i/o requests in memory during it's life. If you need to access the same file again to read, the request is done via the memory, not the hard drive.

    If you look at the last three lines, you've got:

    Code:
      2075964k avaliable
    - 1880416k used
    =  195548k free
    
            0k is being shared among processes
    +   28328k is being used as buffers
    +  639152k is for cached files
    =  667480k which can be written over at any time
    
    therefore
    
       195548k
    +  667480k
    =  863028k avaliable to processes
    All caches and buffers can be written over should any process need it. Although they're allocated for a purpose, they can be re-allocated to a running program at any time.

    The best way to see this is with the 'free' command:

    Code:
    [email protected] tmp $ free
                 total       used       free     shared    buffers     cached
    Mem:        125896     122864       3032          0       4648      23576
    -/+ buffers/cache:      94640      31256
    Swap:       250480     105312     145168
    The first line is the currect state, and the second line is the same, but adjusted for buffers and cache.
    Jonathan Wright (Technical Director, JAB Web Solutions Limited).

    UK Hosting and Reseller Hosting from JAB Web Solutions

  4. #4
    Join Date
    Jan 2003
    Posts
    1,715
    It looks like you have many queries that are working on large data sets to drive up the load. All 'mysqladmin processlist' may reveal more about what's eating so much CPU.
    Game Servers are the next hot market!
    Slim margins, heavy support, fickle customers, and moronic suppliers!
    Start your own today!

Posting Permissions

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