Memory Allocation Parameters / user_beancounters in Virtuozzo 2.6.2

Discussion in 'General Discussion' started by icontact, Aug 29, 2005.

  1. nikolai26

    nikolai26 Mega Poster

    Messages:
    111
    Lets say I want to create a package that has
    Upto 25% CPU
    256MB Ram guaranteed, burstable upto 1024
    500GB Max (no kbps/mbps limit)

    What would the optimal settings for the config file be?
     
  2. fenster

    fenster Tera Poster

    Messages:
    429
    Look at the sample configuration file for 256 MB, it's what you probably need. Set CPULIMIT to 25 * number of CPUs.
     
  3. anand

    anand Kilo Poster

    Messages:
    33
    Will it be possible for you to post these config files here ? Or perhaps attach to this post ? I can't seem to find it on my server.
     
  4. fenster

    fenster Tera Poster

    Messages:
    429
    Look at

    # ls -l /etc/sysconfig/vz-scripts/*sample

    They must be there.
     
  5. anand

    anand Kilo Poster

    Messages:
    33
    This is what i find there.

    PHP:
    [root@virtsrv root]# ls -l /etc/sysconfig/vz-scripts/*sample
    -rw-r--r--    1 root     root          246 Jul 30 11:27 /etc/sysconfig/vz-scripts/mount-action.sample
    -rw-r--r--    1 root     root          111 Jul 30 11:27 /etc/sysconfig/vz-scripts/mount-repair.sample
    -rw-r--r--    1 root     root          112 Jul 30 11:27 /etc/sysconfig/vz-scripts/umount-repair.sample
    lrwxrwxrwx    1 root     root           26 Nov 10 03
    :06 /etc/sysconfig/vz-scripts/ve-unlimited.conf-sample -> ./ve-vps.basic.conf-sample
    -rw-------    1 root     root         1265 Nov 12 09:48 /etc/sysconfig/vz-scripts/ve-vps.basic.conf-sample
    -rw-------    1 root     root         1268 Nov 13 17:43 /etc/sysconfig/vz-scripts/ve-vps.normal.conf-sample
    -rw-------    1 root     root          844 Nov 12 13:20 /etc/sysconfig/vz-scripts/ve-vps.starter.conf-sample
    -rw-r--r--    1 root     root          370 Jul 30 11:43 /etc/sysconfig/vz-scripts/vps.configure.sample
    -rw-r--r--    1 root     root         1116 Jul 30 11:43 /etc/sysconfig/vz-scripts/vps.reinstall.sample
    -rw-r--r--    1 root     root          932 Jul 30 11:43 /etc/sysconfig/vz-scripts/vps.vzpkgtools.conf-sample
     
  6. fenster

    fenster Tera Poster

    Messages:
    429
    Code:
    [root@moskito root]# ls -l /etc/sysconfig/vz-scripts/*sample
    -rw-r--r--    1 root     root          246 Jul 30 22:27 /etc/sysconfig/vz-scripts/mount-action.sample
    -rw-r--r--    1 root     root          111 Jul 30 22:27 /etc/sysconfig/vz-scripts/mount-repair.sample
    -rw-r--r--    1 root     root          112 Jul 30 22:27 /etc/sysconfig/vz-scripts/umount-repair.sample
    -rw-r--r--    1 root     root          989 Oct 18 04:12 /etc/sysconfig/vz-scripts/ve-11.conf-sample
    -rw-r--r--    1 root     root         1044 Nov 10 08:25 /etc/sysconfig/vz-scripts/ve-2vps.conf-sample
    -rw-------    1 root     root          723 Aug 26 02:01 /etc/sysconfig/vz-scripts/ve-XPEH.conf-sample
    -rw-r--r--    1 root     root         1040 Oct 13 20:43 /etc/sysconfig/vz-scripts/ve-db.oracle.conf-sample
    -rw-r--r--    1 root     root         1010 Oct 13 20:43 /etc/sysconfig/vz-scripts/ve-light.conf-sample
    -rw-r--r--    1 root     root         1043 Nov  6 22:58 /etc/sysconfig/vz-scripts/ve-my1.conf.conf-sample
    -rw-r--r--    1 root     root         1041 Aug 24 06:27 /etc/sysconfig/vz-scripts/ve-one-vps.conf-sample
    lrwxrwxrwx    1 root     root           26 Nov  4 07:40 /etc/sysconfig/vz-scripts/ve-unlimited.conf-sample -> ./ve-vps.basic.conf-sample
    -rw-r--r--    1 root     root         1060 Nov 12 15:05 /etc/sysconfig/vz-scripts/ve-unlimited.db2.conf-sample
    -rw-r--r--    1 root     root          834 Oct 13 20:43 /etc/sysconfig/vz-scripts/ve-vps.1024MB.conf-sample
    -rw-r--r--    1 root     root          851 Oct 13 20:43 /etc/sysconfig/vz-scripts/ve-vps.2048MB.conf-sample
    -rw-r--r--    1 root     root          814 Oct 13 20:43 /etc/sysconfig/vz-scripts/ve-vps.256MB.conf-sample
    -rw-r--r--    1 root     root          819 Oct 13 20:43 /etc/sysconfig/vz-scripts/ve-vps.512MB.conf-sample
    -rw-r--r--    1 root     root         1121 Aug 31 19:48 /etc/sysconfig/vz-scripts/ve-vps._plesk7.fc2.conf-sample
    -rw-r--r--    1 root     root         1068 Oct 13 20:43 /etc/sysconfig/vz-scripts/ve-vps.basic.conf-sample
    -rw-r--r--    1 root     root         1128 Sep  8 10:06 /etc/sysconfig/vz-scripts/ve-vps.basic1.conf-sample
    -rw-r--r--    1 root     root         1046 Oct 13 20:43 /etc/sysconfig/vz-scripts/ve-vps.confixx.conf-sample
    -rw-r--r--    1 root     root          989 Oct 13 20:43 /etc/sysconfig/vz-scripts/ve-vps.cpanel.conf-sample
    -rw-r--r--    1 root     root         1180 Nov  1 10:59 /etc/sysconfig/vz-scripts/ve-vps.plesk7.as3.conf-sample
    -rw-r--r--    1 root     root         1172 Aug 10 16:29 /etc/sysconfig/vz-scripts/ve-vps.plesk7.fc1.conf-sample
    -rw-r--r--    1 root     root         1171 Aug 25 18:58 /etc/sysconfig/vz-scripts/ve-vps.plesk7.fc2.conf-sample
    -rw-r--r--    1 root     root         1176 Oct 13 20:43 /etc/sysconfig/vz-scripts/ve-vps.plesk7.rh9.conf-sample
    -rw-r--r--    1 root     root          370 Oct 13 20:43 /etc/sysconfig/vz-scripts/vps.configure.sample
    -rw-r--r--    1 root     root         1116 Oct 13 20:43 /etc/sysconfig/vz-scripts/vps.reinstall.sample
    -rw-r--r--    1 root     root          932 Oct 13 20:43 /etc/sysconfig/vz-scripts/vps.vzpkgtools.conf-sample
    [root@moskito root]# rpm -qf /etc/sysconfig/vz-scripts/ve-vps.256MB.conf-sample
    vzctl-2.6.2-36.swsoft
     
  7. anand

    anand Kilo Poster

    Messages:
    33
    hmm this is strange. I extracted those sample files from inside the rpm. Thanks.
     
  8. nikolai26

    nikolai26 Mega Poster

    Messages:
    111
    Thanks but how does it know its
    256MB Ram guaranteed, burstable upto 1024
    as opposed to
    256MB Ram guaranteed, 256MB fixed limit?
     
  9. Emerson@

    Emerson@ Kilo Poster

    Messages:
    43
    I am looking for this also,

    Anyone know ?
     
  10. fenster

    fenster Tera Poster

    Messages:
    429
    You should compare 'vmguarpages' and 'privvmpages'. The explanation of both parameters is already in this thread.
     
  11. Emerson@

    Emerson@ Kilo Poster

    Messages:
    43
    Thank you Alexander for the reply :)

    So to make this clear to my confused mind :D

    If I want to have roughly 256MB guaranteed and 1GB Burst I should be setting the following:
    vmguarpages = 64000
    privvmpages = 256000

    Is the above correct?

    Thanks for the help ;)
     
  12. fenster

    fenster Tera Poster

    Messages:
    429
    It is correct.
     
  13. Emerson@

    Emerson@ Kilo Poster

    Messages:
    43
    Alexander, thank you very much. I really appreciate your help ;)
     
  14. nikolai26

    nikolai26 Mega Poster

    Messages:
    111
    How does the oomguarpages tie into this?
     
  15. fenster

    fenster Tera Poster

    Messages:
    429
    The first page of this thread contains detailed explanation of that.
     
  16. nikolai26

    nikolai26 Mega Poster

    Messages:
    111
    You should make oomguarpages 64000, unless your overselling, then it would be less, right?
     
  17. barmaley

    barmaley Mega Poster

    Messages:
    233
    Not exactly. oomguarpages is out of memory
    guarantee and doesn't matter when your
    applications try to get some memory. The barrier
    for this parameter means a VPS' processes
    can use that many pages in out of memory
    situation on the hardware node. It also means
    that you must consider the whole picture when
    setting oomguarpages for your VPSes.
    If total for all running VPSes is more than total
    virtual memory on your box, if out of memory
    should happen your box might and probably will
    crash.
     
  18. QuickLearner

    QuickLearner Kilo Poster

    Messages:
    18
    Emerson, I think you should multiply by 1024 and not 1000. WIth 64000, you are allocating 250 MB instead 256 MB for privvmpages & only 976.5625 MB (0.9536 GB) instead of 1024 MB or 1 GB for privvmpages as you desire to.
     
  19. QuickLearner

    QuickLearner Kilo Poster

    Messages:
    18
    Hi Alexander,
    Well I dont see the samples, but obviously I'm looking in a VPS and not the node. Is there anywhere else that I can get these sample configs from?

    Secondly, would you please tell me if it is normal to see fail counts increase even when current value of a parameter is well below the soft limit even?
     
  20. barmaley

    barmaley Mega Poster

    Messages:
    233
    these are part of vzctl package, so you can get it and extract it:

    # mkdir tempdir
    # cd tempdir
    # rpm2cpio /path/to/vzctl-<version>.rpm | \
    cpio -id
    # find etc -type f -name \*sampl\*
     

Share This Page