Real Memory Usage is always high *Do I need to Upgrade?*

Discussion in 'VPS Talk' started by c740015, Apr 16, 2010.

  1. c740015

    c740015 New Member

    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    0
    Hi..

    I have been using the VPS for a few days now and noticed that the Real Memory Usage is always High..

    <TABLE id=sortableTableNaN width="100%"><TBODY><TR class=ui_form_pair><TD class=ui_form_label width="15%">Real memory</TD><TD class=ui_form_value width="35%">1024 MB total, 810.94 MB used
    </TD></TR></TBODY></TABLE>
    When there is about 20 users online it will steady at just under 700...

    But I feel thats still to high...

    Is there a problem with my configuration..

    I have my apache config setup like this

    <IfModule mpm_prefork_module>
    StartServers 5
    MinSpareServers 5
    MaxSpareServers 10
    MaxClients 150
    MaxRequestsPerChild 0
    </IfModule>

    Also A few times now the website Has cut out with memory usage...
    which wont allow me into Webmin So I have to reboot the server.

    Do I need to upgrade..... If so I wanna upgrade now..
    How do I go about this?
    How long does it take?

    Thanks
     
  2. carl6969

    carl6969 Community Support Team Community Support

    Messages:
    6,874
    Likes Received:
    206
    Trophy Points:
    63
    I have noticed that periodically, and for no apparent reason, running processes on my VPS will spike up causing memory usage to jump way up. When this happens I reboot the server and everything settles down to normal for a week weeks.
    If you are consistently having memory usage issues and you don't have any major configuration problems it may be time to upgrade. However, it appears that I have the same plan that you do and I have never exceeded 60 percent memory usage even though I am hosting several domains with many large databases, many email accounts, and lot's of traffic.

    I upgraded my VPS very shortly after purchasing it to obtain more memory. If you decide to do this just open a support ticket stating that you want to upgrade your plan and they will take care of it for you. In my case the upgrade was completed almost instantly, but your mileage may vary <G>.

    Very happy to see that your VPS is up and running. I know you had some difficulties for awhile.
     
  3. TechAsh

    TechAsh Retired

    Messages:
    5,853
    Likes Received:
    7
    Trophy Points:
    38
    There are a number of things that you can do to reduce memory usage. Stopping programs that you do not need being the biggest, but disabling unneeded Apache mods will also help.

    You might want to try this:
    StartServers 1
    MinSpareServers 1
    MaxSpareServers 5
    MaxClients 150
    MaxRequestsPerChild 500

    Also if you do not need innodb support in MySQL you could disable it by putting "skip-innodb" in the "[mysqld]" section of the mysql config file. This will usually save a fair bit of memory.
     
  4. c740015

    c740015 New Member

    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    0
    well right now is peak times.. And my memory has maxed out at 100% server just shut down on me..

    I think the configuration is bad.. I only have 1 forum running off it and a gallery.. with 2 mysql databases..
    The gallery holds very little its lke 4kb an image with 20 per page..
    I have 46 users online now and the memory is just hitting the roof..

    Help would be amazing if its my configuration then its needs redoing or upgrading?
    You said you have alot of activity.. with a few forums and the same package wow..
    I must be way wrongly configured.

    well anyway its cutting out now with 46 users online.. So I either need to upgrade now.. Or Config it fast lol

    Help would be amazing Thanks..

    @ TechAsh where is that setting to reduce I need a lil memory.. Lol.. Its maxing on 100% all the time now.
     
    Last edited: Apr 16, 2010
  5. TechAsh

    TechAsh Retired

    Messages:
    5,853
    Likes Received:
    7
    Trophy Points:
    38
    The MySQL config file will probably be /etc/my.cnf
    If definitely seems like you have something setup wrong.
    I can run a fairly large number of sites (Not many visitors though) with Apache PHP and MySQL, BIND nameserver, mail server with spam filter and things like Apache's mod_svn and trac. My server only uses 250MB of memory :p
     
  6. c740015

    c740015 New Member

    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    0
    @ TechAsh I changed my config.. After doing some research on google.

    StartServers 5
    MinSpareServers 5
    MaxSpareServers 10
    MaxClients 150
    MaxRequestsPerChild 0

    I used this setting..

    I know you put 400 and that was supposed to be the cause for apache not working...
    Well I put it back to 0 and it worked also changed then max clients servers and what not..
    Based off what the information gave me from the website i looked at.

    But yeah.. As soon as my users online hits 40 I'm doomed lol..
    well on shared hosting it used to cut out on 40 aswell thats why youl see my max members online at anyone time at 44
    well 46 today as more managed to get on..

    This is so hard.. lol...
     
  7. TechAsh

    TechAsh Retired

    Messages:
    5,853
    Likes Received:
    7
    Trophy Points:
    38
    Optimizing settings is a really hard thing to do, and I can't really tell you what settings to use as it really depends on your sites etc. The settings in my previous posts are "what works for me", and like I said my server doesn't use more than 250MB of memory.
    The best suggestion I can give is to read up on what the settings do, then have a play with them until you find something that you are satisfied with.
     
  8. c740015

    c740015 New Member

    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    0
    OMG no way..

    Well my is constantly streaming ajax.. Maybe that is the problem with the shoutbox and notifications I use for new posts popups and PM'S..
    Well I just disabled IT..
    And complete removed it from my php scripts.

    Which was used for popups to show new posts and PM's
    But its disabled and uninstalled completely now.
    Its some times annoying anyway lol..

    So that isnt used any more...

    Checked my Ram.. Its still approaching 700 lol.. with the ammont of users online It doesnt seem like its changed much..
    But it seems like a little improvment.. or non at all I aint sure.. I cant tell lol..
    with 26 users now ad they probably think its whack lol its at 600 and 800
    So I can see its helped a little.

    It was at 40+ users the memory throws a fit and comes up with memory allocation Fatal Error. :'(

    but its allowing them on lol.

    Hmm yeah Tech Ash I changed My settings to this

    StartServers 1
    MinSpareServers 1
    MaxSpareServers 5
    MaxClients 150
    MaxRequestsPerChild 0

    It seems to of dropped a little on the ram not to about 100mb less.
    Which is a bonus but also the users have dropped by 15 lol..

    But yeah I not sure how the MaxRequestsPerChild works but I just set it back to 0 and all the website is working well..

    Ash when there was a problem with the website not even working it was on 0..

    But I changed it back to 0 and its working fine now???? Strange.. Is there a difference between using 500 or zero?
    From what I read it can lead to memory leakedge with a value otherthan 0 in there not sure.
    Also did you change anything else because it works on 0 lol.

    So overall with the members online to memory ratio with my setting set as

    StartServers 1
    MinSpareServers 1
    MaxSpareServers 5
    MaxClients 150
    MaxRequestsPerChild 0

    there is 27 members online and my memory is
    Real memory 1024 MB total, 622.14 MB used
    With Enotify uninstalled.
     
  9. c740015

    c740015 New Member

    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    0
    wow used the skip thing... That suped me up good style Im inbetween 450 and 600 now.. Thats a huge load off..

    There is only 28 members online now though.. but its lower than b4 when 28 members was online :)

    I have never seen 400 before.. I think when I installed it before adding the databases it was in like 350..
    God knows how you get it on 250 thats amazing Lmfao...
    If Only! LMFAOO

    also it was located in /etc/mysql/my.cnf :D

    Thanks..

    I'm learning alot.. Also thanks to you guys for all your support the community is surviving and people are staying happy :)
     
    Last edited: Apr 16, 2010
  10. masshuu

    masshuu Head of the Geese Community Support Enemy of the State

    Messages:
    2,293
    Likes Received:
    50
    Trophy Points:
    48
    there are other ways to kill mem usage.
    since i use enoms nameservers, i don't need dns services, so that lets me turn bind off(which frees a good chunk of ram)
     
  11. c740015

    c740015 New Member

    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    0
    Hmm yeah since I create my nameserver on godaddy.. I don't think I need bind running either..

    Is that correct?
     
  12. TechAsh

    TechAsh Retired

    Messages:
    5,853
    Likes Received:
    7
    Trophy Points:
    38
    So long as you have set all you A, MX etc records on GoDaddy then you are correct, you don't need BIND running.
     
  13. c740015

    c740015 New Member

    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    0
    Well I seem to be hitting 800mb when 38 members come online... And the server just overloads on me,,, Is my configuration bad or so I need to get more power?

    Im using this in apache config
    StartServers 1
    MinSpareServers 1
    MaxSpareServers 5
    MaxClients 150
    MaxRequestsPerChild 0

    Is it best to change MaxRequestsPerChild to 500 ?? Would that improve it from zero?
     
  14. carl6969

    carl6969 Community Support Team Community Support

    Messages:
    6,874
    Likes Received:
    206
    Trophy Points:
    63
    I really don't know if this will help any, but my Apache config is the Virtualmin (Centos) default. I have never changed any of these settings:
    StartServers 8
    MinSpareServers 5
    MaxSpareServers 20
    ServerLimit 256
    MaxClients 256
    MaxRequestsPerChild 4000
    You are using a different operating system which may be a factor to consider with your Apache config. I really don't know.
    I do know that I have 19 domains and subdomains running with many databases and lot's of traffic most of the time. At the time of this writing I am using 465 MB of memory.
    This config works for me, but, as stated earlier, your mileage may vary.
     
    Last edited: Apr 19, 2010
  15. c740015

    c740015 New Member

    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    0
    I think I need more power 10 users online and it was at 500-600MB
    I average between 80 and 110 processes...
    So I not sure If I have more running than I need to or anything lol...

    When I reverted back to my settings It dropped to 400 right away..
    So nope thats not good for me lol

    But yeah I think I need to upgrade.

    How do I go about this and when would it take effect I wouldn't have to start again would I.. I seriously do not wanna give the heart ache of the site being offline again Lmfao...

    Thanks for all your help You been amazing.. You turned a noob into some one who knows a little bit about all this now..
    If though there unmanaged.. I think this is better support than managed...

    Thanks :)
     
    Last edited: Apr 19, 2010
  16. xemotso

    xemotso New Member

    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    hmm, you should consider switching to CentOS 5 Kloxo LXAdmin, it has all the essentials. And it runs at about 30mb of ram with no one on.
     
  17. carl6969

    carl6969 Community Support Team Community Support

    Messages:
    6,874
    Likes Received:
    206
    Trophy Points:
    63
    Seems like there should be some way of making your setup work with your current VPS plan. I am very inclined to believe that your issues are related to configuration and not available memory. Unfortunately you are using a OS which I am unfamiliar with.
    However, I can speak from first hand experience regarding the upgrade process if you chose to do that. All you have to do is open a support ticket in your VPS Client Area stating what particular plan you wish to upgrade to. I did this very thing several months ago and the process was quick, painless, and you do not have to "start over". Once the upgrade is complete the only difference you should notice is increased memory and disc space.
     
  18. c740015

    c740015 New Member

    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    0
    You know what I'm going to try this now as my debian has messed up. I only went with debian because I was given a really simple setup.
    I hope this will save me some ram Might be for the best :D
     

Share This Page