Results 1 to 15 of 15
  1. #1
    Join Date
    Sep 2006
    Location
    Somewhere Heights, Ohio
    Posts
    10

    Should memory usage be this high?

    Last weekend, I moved my site over to a new VPS host.

    Since the move, though, I've been getting numerous "out of memory" errors whenever visiting one of my own vBulletin or other CMS-generated pages. I never got an "out of memory" error message until I moved the site.

    Running "top" in the shell gives me these results:

    top - 12:26:48 up 13:48, 1 user, load average: 0.55, 0.86, 0.82
    Tasks: 68 total, 2 running, 66 sleeping, 0 stopped, 0 zombie
    Cpu(s): 9.4% us, 0.6% sy, 0.0% ni, 90.0% id, 0.0% wa, 0.0% hi, 0.0% si
    Mem: 8042636k total, 7981224k used, 61412k free, 272132k buffers
    Swap: 10240680k total, 44836k used, 10195844k free, 5428780k cached


    free -m gives me:

    total used free shared buffers cached
    Mem: 7854 7787 66 0 266 5302
    -/+ buffers/cache: 2219 5634
    Swap: 10000 43 9956


    Memory used is about 99% of that available. Is such high memory usage
    normal?

    For what it's worth, it's a 768MB VPS package.

    A mostly stock installation of vBulletin, along with a slightly modified version of Drupal, with peak usage of around 100 visitors in a 15 minute period, should not be causing the server to consume almost eight gigabytes of memory, so I don't think it's me. Or ... could it? What do you think?

    EDIT:

    Code:
    [email protected] [/etc]# cat /proc/user_beancounters
    Version: 2.5                                                                   
           uid  resource           held    maxheld    barrier      limit    failcnt
          6719: kmemsize        9285039    9302706   22763520   25292800          0
                lockedpages           0          0        512        512          0
                privvmpages      147890     148289     152100     169000    2045163
                shmpages            731        731      43008      43008          0
                dummy                 0          0          0          0          0
                numproc             224        226        480        480          0
                physpages        104171     104233          0 2147483647          0
                vmguarpages           0          0      86000 2147483647          0
                oomguarpages     104179     104241      52224 2147483647          0
                numtcpsock           45         47        720        720          0
                numflock             11         11        338        376          0
                numpty                2          2         32         32          0
                numsiginfo            0          2        512        512          0
                tcpsndbuf         90504     148432    2211840    3686400          0
                tcprcvbuf          4456       6684    2211840    3686400          0
                othersockbuf      36028     603732    1437696    3686400          0
                dgramrcvbuf           0       2228    2560000    2560000          0
                numothersock         35         43        360        360          0
                dcachesize       579308     585622    6137856    6819840          0
                numfile            1670       1677      18624      18624          0
                dummy                 0          0          0          0          0
                dummy                 0          0          0          0          0
                dummy                 0          0          0          0          0
                numiptent            47         47        512        512          0
    Code:
    top - 15:53:18 up 17:15,  1 user,  load average: 0.98, 0.74, 0.69
    Tasks:  76 total,   1 running,  75 sleeping,   0 stopped,   0 zombie
    Cpu(s): 23.8% us,  2.1% sy,  0.0% ni, 74.1% id,  0.0% wa,  0.0% hi,  0.0% si
    Mem:   8042636k total,  8031484k used,    11152k free,   318808k buffers
    Swap: 10240680k total,    47632k used, 10193048k free,  5439560k cached
    
      PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                
     3412 nobody    16   0 22224  16m 9760 S 24.5  0.2   2:24.04 httpd                                                                  
    28246 nobody    15   0 21480  16m 9760 S 20.2  0.2   0:06.57 httpd                                                                  
     5874 nobody    15   0 22768  17m 9784 S 10.6  0.2   5:28.62 httpd                                                                  
    30199 nobody    16   0 21296  15m 9760 S  9.9  0.2   0:03.13 httpd                                                                  
    25654 nobody    15   0 22336  17m 9784 S  8.6  0.2   2:46.92 httpd                                                                  
    28248 nobody    15   0 21456  16m 9760 S  8.3  0.2   0:06.73 httpd                                                                  
    30168 nobody    15   0 15284  10m 9760 S  6.0  0.1   0:03.61 httpd                                                                  
    30442 nobody    15   0 14656 9712 9760 S  5.3  0.1   0:01.29 httpd                                                                  
    15806 nobody    16   0 22264  17m 9760 S  1.0  0.2   1:34.17 httpd                                                                  
    30520 root      15   0  1884  992 1676 R  0.7  0.0   0:00.14 top                                                                    
        1 root      16   0  1616  608 1420 S  0.0  0.0   0:00.54 init                                                                   
    12095 root      16   0  1520  588 1356 S  0.0  0.0   0:00.83 syslogd                                                                
    12113 root      24   0  1444  460 1292 S  0.0  0.0   0:00.00 courierlogger                                                          
    12114 root      16   0  1788  604 1436 S  0.0  0.0   0:00.00 authdaemond                                                            
    12116 root      16   0  1788  628 1436 S  0.0  0.0   0:00.01 authdaemond                                                            
    12117 root      16   0  1788  628 1436 S  0.0  0.0   0:00.02 authdaemond                                                            
    12118 root      16   0  1788  628 1436 S  0.0  0.0   0:00.01 authdaemond                                                            
    12119 root      16   0  1788  628 1436 S  0.0  0.0   0:00.01 authdaemond                                                            
    12120 root      16   0  1788  628 1436 S  0.0  0.0   0:00.02 authdaemond                                                            
    12139 named     24   0 55880 3516 4844 S  0.0  0.0   0:00.00 named                                                                  
    12156 root      20   0  3992 1704 3620 S  0.0  0.0   0:00.81 sshd                                                                   
    12166 root      16   0  2068  864 1740 S  0.0  0.0   0:00.00 xinetd                                                                 
    12175 root      18   0  2140 1100 1952 S  0.0  0.0   0:00.02 mysqld_safe                                                            
    12198 mysql     15   0 99344  26m 6704 S  0.0  0.3   0:16.16 mysqld                                                                 
    12226 root      15   0  9740 8508 2704 S  0.0  0.1   0:04.34 chkservd                                                               
    12246 root      16   0  1448  464 1292 S  0.0  0.0   0:00.02 courierlogger                                                          
    12247 root      16   0  1552  484 1396 S  0.0  0.0   0:00.06 couriertcpd                                                            
    12253 root      21   0  1448  388 1292 S  0.0  0.0   0:00.00 courierlogger                                                          
    12254 root      18   0  1552  464 1396 S  0.0  0.0   0:00.00 couriertcpd                                                            
    12259 root      15   0  1448  464 1292 S  0.0  0.0   0:00.17 courierlogger                                                          
    12260 root      16   0  1552  484 1396 S  0.0  0.0   0:00.23 couriertcpd  
    Last edited by elmwood; 09-21-2006 at 03:54 PM.

  2. #2
    Join Date
    Sep 2005
    Posts
    73
    your vmguarpages and privvmpages parameters look wrong for a 768mb package.

  3. #3
    Join Date
    Dec 2004
    Location
    Butler,TN
    Posts
    2,413
    Hi!
    I agree...something very, very wrong. On my current VPS (580MB RAM)

    Kmem 1560626 1578123 14517964 16131072
    vmp 0 0 143508 21447483647
    oomp 2080 2086 143508 21447483647

    etc...etc..

    I would have a talk with this host about fair allocations...not that I have not railed on and on about it. Someday....

    Bryon
    Bryon L Harvey
    Soil Relocation Engineer

  4. #4
    This is actually a 384MB/768MB package

    768MB is the burstable limit, which is not enough for this usage pattern
    EuroVPS VPS Hosting - Virtual Private Servers | Web Hosting | Dedicated Servers
    Providing Reliable Plesk and cPanel Servers since 2004, now offering low priced Xen & VMware VPS in Amsterdam
    UK +44.203.355.6681 / Amsterdam +31.208.202.120

  5. #5
    Join Date
    Dec 2004
    Location
    Butler,TN
    Posts
    2,413
    Hi!
    Ok. So that's it? After one week...he needs to upgrade to the next package?
    Maybe it's me..but could this have been predicted last week? See..that's what I don't get about many hosts. On one hand..most will provide Cpanel and all the junk that comes with it...and then the user even adds more stuff...and then...son of a gun...there are resource problems.

    Did he not have Vbulletin last week? Come on...let's start taking some responsibility here...and not leave the user hanging.

    THere are many things to do here:

    1) Tweak Mysql setup..maybe use something else? Remember...intel compiler built binaries are free from MySQL...and improve performance...sometimes dramatically.
    2) Tweak web server setup...maybe even replace apache with lightppd.
    3) Caching PHP pages...this is a option..there are several about
    4) Shutdown services he doesn't really need
    5) Get rid of Cpanel maybe?

    And much more...I'm sure. In my opinion...this practice of just telling a user he needs to upgrade to the next package...because it's the easiest...and brings more money in for the host...is sad.

    Bryon
    Bryon L Harvey
    Soil Relocation Engineer

  6. #6
    Join Date
    Dec 2004
    Location
    Butler,TN
    Posts
    2,413
    Hi!
    DAng...no wonder I've never had a VPS with eurovps. That 384MB RAM VPS is ~$76.66 US/month. Heck..I can get a dedicated server with Cpanel for less than that. Ouch.

    Bryon
    Bryon L Harvey
    Soil Relocation Engineer

  7. #7
    Join Date
    Dec 2004
    Location
    Butler,TN
    Posts
    2,413
    Hi!
    I guess this offering is unmanaged. My bad. Oh..the $76.66 is if you pay yearly...it's even more month to month...even more ouch.

    IBM Eservers! Chipkill RAM! 15000 RPM drives! Impressive.

    Bryon
    Bryon L Harvey
    Soil Relocation Engineer

  8. #8
    Join Date
    Sep 2006
    Location
    Somewhere Heights, Ohio
    Posts
    10
    Thanks everyone!

    I'm going to try optimizing first, and see what that does. cPanel is supposedly a memory hog, so there's the possibility of replacing it with Plesk. Let's see what happens.

  9. #9
    Join Date
    Dec 2004
    Location
    Butler,TN
    Posts
    2,413
    Hi!
    That's a good plan. spamd is the worst offender..I have heard...so just tweaking your exim setup will help. Disable spamassassin in both the services and setup section of Cpanel if you do not need it.

    In fact...I thought of something else just now. Be back in a minute or two.

    Ok..go into the board search^^^ section of WHT and do a search on:

    VPS Optimization

    There are several threads that give you advice on optimizing MySQL.

    Bryon
    Last edited by bryonhost1; 09-21-2006 at 08:03 PM.
    Bryon L Harvey
    Soil Relocation Engineer

  10. #10
    Join Date
    Sep 2006
    Location
    Somewhere Heights, Ohio
    Posts
    10
    Quote Originally Posted by bryonhost1
    Hi!
    I guess this offering is unmanaged. My bad. Oh..the $76.66 is if you pay yearly...it's even more month to month...even more ouch.
    It is managed, and the support is phenomenal. I just don't always want to run to support, that's all. I've still got a bit to learn about running a server.

  11. #11
    Join Date
    Nov 2005
    Location
    Michigan, USA
    Posts
    3,872
    I don't think Plesk is any better on CPU usage. Try Interworx or DirectAdmin...those I've heard use much lower resources and are better for VPS's.

  12. #12
    Join Date
    Dec 2004
    Location
    Butler,TN
    Posts
    2,413
    Hi!
    Good...at that price...it should be. No...that is the best way to go if you truly want to learn...that's always been my route. If you *must* have a cpanel...Webmin is the kindest on server resources. I have some warnings now..from experience...Cpanel will not tolerate some changes to it's environment..so I wanted to warn you about a couple of things before you accidently wreck Cpanel...like some people have in the past (cough).

    You should be able to change the user web server...since Cpanel does not use it...and modifys httpd.conf when you add virtual hosts..and named db files..for DNS. I have not tried this, though..so proceed very carefully. Do not even think about upgrading MySQL...Cpanel uses Mysql for it's internal processes..and that will be the end of that. Even messing with the intel-compiled versions should be taken carefully..most of those install scripts do very silly things. For example...I have been in the habit of telling ./configure for help...so I can see the options.
    Well...don't do that with a Mysql configure script..it tries to install even with the --help argument..which was not what I wanted it to do at all.


    I was giving Eurovps a hard time for a reason...they should be more proactive...and suggest alternatives...instead of just telling you to upgrade..that's why I said what I said. A managed server is managed...period. They should have been aware of these problems...and made modifications themselves...you should not have had to do anything...that's why (so you would think) VPS's like these are so expensive. Unmanaged VPS's are cheaper and better for people like me who want to do everything...upgrades, patches, recompiles...everything.

    If you want to take a look at webmin...I would suggest you get a small vps at vpslink.com and take a look at it there..it's quite cheap...and webmin is a very easy install...unlike others (Interworx is impressive...but not a easy install at all)
    and not something taken lightly if you already have a control panel. The only way to honestly get rid of cpanel is to start from scratch...completely. I'm not terribly impressed with Plesk..but to each his/her own.

    I am pleased this thread did happen. This puts to bed the notion that has been put forward (proven false) that high-end hardware makes all the difference..and allocations are not important at all...and just because there are more resources...high-end hosts are not as stingy as lower-end hosts who honestly have less resources to go around.

    Just as I though...wrong.

    Good luck!

    Bryon
    Last edited by bryonhost1; 09-22-2006 at 08:03 AM.
    Bryon L Harvey
    Soil Relocation Engineer

  13. #13
    Join Date
    Sep 2006
    Location
    Somewhere Heights, Ohio
    Posts
    10
    Just to clarify: Nobody asked me to upgrade. I don't know where that's coming from.

    Quote Originally Posted by bryonhost1
    I was giving Eurovps a hard time for a reason...they should be more proactive...and suggest alternatives...instead of just telling you to upgrade..that's why I said what I said. A managed server is managed...period. They should have been aware of these problems...and made modifications themselves...you should not have had to do anything...that's why (so you would think) VPS's like these are so expensive. Unmanaged VPS's are cheaper and better for people like me who want to do everything...upgrades, patches, recompiles...everything.
    Vasili actually called me -- I'm talking a telephone call, which I never got from any host -- when I expressed my concern about the loads. We talked about how the server was configured, how the memory is used, and so on. I really don't expect him to perform all the minutae with VPS administration, though; he's got other clients, and I'm trying to learn more about VPS administration.

  14. #14
    Join Date
    Dec 2004
    Location
    Butler,TN
    Posts
    2,413
    Hi!
    Wow..that is impressive. Still..I have to point out..these allocations..for the price you are paying...well...come up with your own conclusion. If you are happy..so be it.

    But: For $50/month from 4Tvirtual.com I get:

    kmemsize 14517964:16131072
    privvmpages 193735: 215262

    which seems fair enough. And you're paying a lot more than that...well...it's up to you. I am impressed, though. No host ever called me..and I've had 40 VPS's over the last three years.

    Bryon
    Bryon L Harvey
    Soil Relocation Engineer

  15. #15
    Join Date
    Dec 2004
    Location
    Butler,TN
    Posts
    2,413
    Oh!

    And one more thing...for you history buffs..<kick in geezer voice>

    this host is using eservers..which is rare in this business. This servers are from IBM...and used to be powerPC based...and they were called AS/400's!
    They were wonderful...back in "the day" as mini-manframes. State Farm still has a ton of 'em, I'd wager. I just thought I'd throw in a history note for you really interested in learning how really lucky we are today!
    <end old geezer voice>

    Bryon
    Bryon L Harvey
    Soil Relocation Engineer

Posting Permissions

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