Results 1 to 6 of 6
Thread: How to count your Beans (ram)
-
08-20-2011, 09:58 PM #1WHT Addict
- Join Date
- Mar 2011
- Location
- florida
- Posts
- 158
How to count your Beans (ram)
I know many of you have had this problem having less RAM available then you paid for!.
The file /proc/user_beancounters shows the current resource usage/limits
and fail counts (when usage exceeds limit) for each resource allocated
to your server.
Fail Counts should all be 0,s
The 3 main entries which determine your memory allocation are kmemsize,
vmguarpages, and privvmpages.
.
kmemsize is the amount of memory allocated to those sections of programs
which must stay resident and cannot be swapped into the disk swapfile
.
vmguarpages are the virtual memory guaranteed pages and define the
guaranteed memory assigned to your account.
.
Use barrier numbers
.
The equation (((kmemsize/1024)+vmguarpages*4)/1024) will give the
approximate amount of memory, in MB, assigned to your server as there
are a few other entries which contribute a small amount to the
guaranteed limit.
.
The privvmpages determine the amount of memory which your account will
have access to beyond the guaranteed limit, if it is available. This is
the burstable limit. The equation for the burstable limit is
(((kmemsize/1024)+privvmpages*4)/1024) and is in MB.
----------------------------
I purchased 256 meg
Here is my information:
Use the command:
cat /proc/user_beancounters
uid resource held maxheld barrier limit failcnt
919: kmemsize 695072 996074 10800000 12000000 0
lockedpages 0 0 256 256 0
privvmpages 15088 60093 61400 61400 7
shmpages 640 1008 12000 12000 0
dummy 0 0 0 0 0
numproc 18 27 256 256 0
physpages 3551 17450 0 2147483647 0
vmguarpages 0 0 28600 28600 0
oomguarpages 3551 17450 28800 28800 0
numtcpsock 7 16 240 240 0
numflock 3 5 160 160 0
numpty 1 1 32 32 0
numsiginfo 0 5 256 256 0
tcpsndbuf 6684 115856 1440000 1600000 0
tcprcvbuf 0 342080 1440000 1600000 0
othersockbuf 17824 22668 1440000 1600000 0
dgramrcvbuf 0 8372 108000 120000 0
numothersock 14 20 256 256 0
dcachesize 89744 136320 1080000 1200000 0
numfile 247 321 3200 3200 0
dummy 0 0 0 0 0
dummy 0 0 0 0 0
dummy 0 0 0 0 0
numiptent 10 10 1200 1200 0
256 Megs of ram Nope I'm cheated. According to this
(((kmemsize/1024)+vmguarpages*4)/1024)
10800000/1024 = 10546.875
28600* 4= 114400
(114400+10546.875) /1024 =~ 120
I have about 120megs of ram which is half of what i bought!!
Calculate how much Memory you currently have and notify VPS Provider to correct this.
Another VPS i have
I purchased 512 meg
Here is my information:
Use the command:
cat /proc/user_beancounters
uid resource held maxheld barrier limit failcnt
832: kmemsize 580401 1907631 21600000 24000000 0
lockedpages 0 0 512 512 0
privvmpages 4035 55461 122800 122800 0
shmpages 640 2288 24000 24000 0
dummy 0 0 0 0 0
numproc 14 50 512 512 0
physpages 2501 21349 0 2147483647 0
vmguarpages 0 0 57300 57300 0
oomguarpages 2501 21349 57600 57600 0
numtcpsock 3 21 480 480 0
numflock 7 14 320 320 0
numpty 1 3 64 64 0
numsiginfo 0 7 512 512 0
tcpsndbuf 6684 140364 2880000 3200000 0
tcprcvbuf 0 188460 2880000 3200000 0
othersockbuf 8476 207896 2880000 3200000 0
dgramrcvbuf 0 8552 216000 240000 0
numothersock 8 140 512 512 0
dcachesize 71568 240832 2160000 2400000 0
numfile 160 786 6400 6400 0
dummy 0 0 0 0 0
dummy 0 0 0 0 0
dummy 0 0 0 0 0
numiptent 10 10 2400 2400 0
512 Megs of ram Nope I'm cheated. According to this
(((21600000/1024)+57300*4)/1024) =~ 244mb?! This is supposed to be 512mb.
So don't believe what you see without doing the math!!
-
08-20-2011, 10:33 PM #2Web Hosting Master
- Join Date
- Jan 2011
- Location
- Canada
- Posts
- 938
I don't know why you're bringing kmemsize into this.
Run this script
http://wiki.openvz.org/Human_readable_user_beancounters
Your page size calculation might be wrong and you're dealing with 8kB pages.
-
08-20-2011, 10:44 PM #3WHT Addict
- Join Date
- Mar 2011
- Location
- florida
- Posts
- 158
Reason i love math
I already use that script i just like doing math
and the post is for peps that don't want to run scripts or no how to Just a Quick Simple method
The calculation is close enough
-
08-21-2011, 05:25 AM #4Retired Moderator
- Join Date
- Feb 2005
- Location
- Australia
- Posts
- 5,849
Watch out for the page sizes though because some systems do use different ones (and even different page sizes for privvmpages vs oomguarpages within the same beancounters file).
But on your main complaint, oomguarpages / vmguarpages barriers / limits are largely irrelevant anyway - you can happily exceed them provided you keep within the other limits. Most of the time the true limitation on your usage is privvmpages (burst), and this is not extra memory, but an extra limitation on allocated (rather than used) memory. Occasionally some of the minor parameters can get you too (eg. kmemsize) but the provider will normally increase these on request.Chris
"Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter
-
08-21-2011, 05:45 AM #5Web Hosting Master
- Join Date
- Jul 2010
- Location
- ~/
- Posts
- 1,382
Openvz based service i assume? I have only found 2 hosts that do not oversell openvz and no supprise it cost just as much as the xen packages.
Not that this is directed at the OP but generaly if its openvz and cheaper than xen please dont be supprised to find its over sold to some degree.
Overselling is not so much a problem though as no one uses 100% of resources 100% of the time, its over allocation that hurts
-
08-21-2011, 10:18 AM #6Web Hosting Guru
- Join Date
- Aug 2006
- Posts
- 296
Pretty interesting topic....
Been pretty confuse all this time how to calulate the beans correctly..
Similar Threads
-
CPUs count != Cores count != Threads count
By alnitech in forum Dedicated ServerReplies: 25Last Post: 08-03-2011, 08:05 PM -
VPS Beans...?
By keith007 in forum VPS HostingReplies: 6Last Post: 11-28-2006, 01:35 PM -
Bug in my beans!
By SlimSlyk in forum Web Hosting LoungeReplies: 24Last Post: 07-12-2006, 09:34 AM