Results 1 to 28 of 28
  1. #1
    Join Date
    Nov 2009
    Location
    Neenah, WI
    Posts
    388

    CloudLinux LVE Settings

    HI;

    Can anyone share what settings your using for CloudLinux for a shared hosting environment?

    Do you know how the concurrent connections is measured? Any suggestions on a setting for that?

    For number of cores per LVE, if that is set to 1 and your cpu is set to 25, then I assume they get %25 of one processor. If the number of cores is set to 2 and the cpu is set to 25, does that mean they get 25% of 2 processors (equivalent to 50% of one)?

    Thanks very much;

  2. #2
    Join Date
    Dec 2007
    Location
    Indiana, USA
    Posts
    16,087
    The percent is based off of the total number of processors in the server. For example if you set nCPU to 1 the maximum % they can actually use (in a 16 core server, for example) is 6.25% (which is 100% / 16).

    If you set nCPU to 2, then the max they could use would be 12.5% or 2 Cores.

    Realistically I've always just set the CPU % to 100 and then specified how many cores I wanted each account to have access to. The only time CPU% is actually important is if you want to give them access to less than a whole core (or access to less than a total of two cores).

    If you set CPU% to 6% and NCPU to 2, then you'd be giving them essentially 1/2 of two cores - it can be a lot to wrap your head around but like I said, I generally just advise leaving the CPU % at 100
    Michael Denney - MDDHosting LLC
    New shared plans for 2016! Check them out!
    Highly Available Shared, Premium, Reseller, and VPS
    http://www.mddhosting.com/

  3. #3
    Join Date
    Jun 2004
    Location
    California
    Posts
    682
    Quote Originally Posted by jamiedolan View Post
    Can anyone share what settings your using for CloudLinux for a shared hosting environment?
    The settings you use will vary based on the hardware you have and the quality of service you offer. Chose a sensible starting point and adjust from there.

    Quote Originally Posted by jamiedolan View Post
    Do you know how the concurrent connections is measured? Any suggestions on a setting for that?
    HawkHost recently did a nice write up on CloudLinux for their clients, but it does a nice job of explaining the concurrent connections. http://blog.hawkhost.com/2011/02/28/...s-cloud-linux/

    You might also want to read the "Working with LVE" page on the CloudLinux site if you haven't yet: http://cloudlinux.com/docs/workingwithlve.php
    Scott Swezey
    TCL Fasteners, Inc.
    Automotive fasteners for collision shops.

  4. #4
    Join Date
    Nov 2009
    Location
    Neenah, WI
    Posts
    388
    Quote Originally Posted by MikeDVB View Post
    The percent is based off of the total number of processors in the server. For example if you set nCPU to 1 the maximum % they can actually use (in a 16 core server, for example) is 6.25% (which is 100% / 16).

    If you set nCPU to 2, then the max they could use would be 12.5% or 2 Cores.

    Realistically I've always just set the CPU % to 100 and then specified how many cores I wanted each account to have access to. The only time CPU% is actually important is if you want to give them access to less than a whole core (or access to less than a total of two cores).

    If you set CPU% to 6% and NCPU to 2, then you'd be giving them essentially 1/2 of two cores - it can be a lot to wrap your head around but like I said, I generally just advise leaving the CPU % at 100
    Thank you both for the information. I'm on a 64 bit Linode xen Vps with 1024MB of ram. It is very easy to rapidly scale up with them.

    I can use as much as 4 cores. Everyone I talk to in linode IRC says the machines are all underused and they never run into processor limits.

    Even a full core sounds like a lot of power. But if 1 full core was being used, chances are very good that I would still be up and running with full power.

    I think I'll just leave it at 100% for now then, and I can evaluate how much a site really consumes once I get some sites loaded on the machine.

    Thank You.

  5. #5
    Crucial Web Host is offline [email protected]
    Join Date
    Apr 2006
    Location
    Phoenix, AZ, USA
    Posts
    745
    Quote Originally Posted by jamiedolan View Post
    I can use as much as 4 cores.

    Even a full core sounds like a lot of power. But if 1 full core was being used, chances are very good that I would still be up and running with full power.

    I think I'll just leave it at 100% for now
    Hi Jamie -

    I don't think you have a full understanding the way CloudLinux assigns CPU power. I'll try to explain and I am sure others will correct any inaccuracies.

    From the docs Michael helpfully pointed out above;

    CPU Limits explained

    CloudLinux allows to set % of CPU being used relative to total number of CPU cores available on the server. This means that 5% setting on 8 core server will be 40% of single core allocated for LVE. On 4 core server 5% would mean 20% of single core.
    In addition to CPU limits each LVE is limited by number of cores that it can use. The default is set to 1. There is a small overhead related to number of sites * number of cores per site. So, a server with 32 cores and 5,000 sites will have a lot of overhead. Yet, setting just one core per LVE reduces that overhead by 32. In most cases, one core per LVE should be enough.

    The number of cores settings takes precedence. For example if you have 25% CPU limit, 1 core per LVE, and 8 core server -- each LVE will be limited by 100/8 =~ 12%, instead of 25% CPU, as at most one core will be used by each LVE (1 core on 8 core server ~= 12% of total CPU capacity)
    So, here is the way this works –

    If you have 4 cores available and you assign one core to the LVE, the absolute most this core can consume is 25% (1core x 100) / 4 (total cores) of a single core.

    If you have 8 cores available and you assign one core to the LVE, the absolute most this one core can consume is 12.5% (1core x100) / 8 (total cores) of a single core.

    However, if you increase the nCPU value to two cores – this now changes. For the examples above these are the changes;

    If you have 4 cores available and you assign TWO cores to the LVE, the absolute most each core can consume is 50% (2cores x 100) / 4 (total cores) of each core.

    If you have 8 cores available and you assign TWO cores to the LVE, the absolute most each core can consume is 25% (2cores x 100) / 8 (total cores) for each core.

    So, the first example demonstrates that the most CPU you can assign to the LVE is either 25% or 12.5% depending on the number of cores available to your system.

    Raising the CPU % above the 25% or 12.5% will have no effect – the documentation states explicitly;

    The number of cores settings takes precedence <over the CPU %>
    So, let’s take another example. On a 24 core system you have the following LVE configuration;

    Code:
    <cpu limit="30"></cpu>
    <ncpu limit="8"></ncpu>
    In this scenario, the nCPU value provides 8 cores to the LVE with a CPU limit of ‘30’.

    So, get the maximum amount of CPU this LVE can use per core –

    24 cores available and 8 cores assigned to LVE, the absolute most each core can consume is 33% (8cores x 100) / 24 (total cores).

    However, the CPU Limit directive instructs LVE to limit to 30%, just below LVE Maximum CPU as illustrated above.

    So – as example – we push a host to CPU limit and watch via lvetop;

    Code:
    # ab -n 500 -c 100 http:// 192.168.10.10/
    Code:
                 ID     EP    PNO    TNO    CPU    MEM    I/O
            testuser     10     10     10    30%      0      0

    In this case the LVE configuration stopped the LVE from consuming more than 30% - if the cpu limit=" 30’ was say… cpu limit=”50%” then lvetop would have stopped at exactly 33%, which is the per nCPU max.

    Code:
    <cpu limit="50"></cpu>
    <ncpu limit="8"></ncpu>
    
    # ab -n 500 -c 100 http://192.168.10.10/
    
    # lvetop
                 ID     EP    PNO    TNO    CPU    MEM    I/O
            testuser     10     10     10    33%      0      0
    As you can see, going beyond 33% has no effect, so setting your CPU % to 100% but allowing 1 nCPU core of a total 4 has a limiting effect – you will be limited to 25% of the single CPU core.

    Now, you can ‘decrease’ it from 25% - so if you set CPU to 10%, that would limit the LVE of using 10% of the single core – but setting it to 50% would have no effect – the LVE would still be limited to 25% per the nCPU directive.

    Hope this is of some use.
    Last edited by Crucial Web Host; 03-11-2011 at 04:52 PM.
    CrucialHosting.com - Performance Hosting Solutions:
    SamsClub.com - Walmart.com - Ellusionist.com - CampSaver.com

    Check out our Site Showcase for more big brand examples!

  6. #6
    Join Date
    Jun 2001
    Location
    Princeton
    Posts
    836
    Sorry, but this is incorrect. The whole thing is counter-intuitive, it is so because we cannot change ncpu per LVE on the fly, and you have to reboot server to adjust that setting. Otherwise there would be just one parameter -- CPU%.

    So, the way it works:
    We first calculate the amount of CPU per LVE based on CPU % setting.
    If you have 8 core server, and CPU is set to 25%, it means 2 cores total.

    Then we take nCPU parameter, and if it is set to 1 core -- it means that you will be able to use just one core (but 100% of one core).

    Now, lets say there is 8 cores, nCPU is set to 1, and CPU is set to 5%.
    5% of 8 cores is about 62.5% of 1 core.
    As the result you will be using 62.5% of 1 core.

    Another example: 8 cores, nCPU is set to 2, and CPU is set to 20%
    That would give you 1.6 cores (or one full core, and 60% of other core) per LVE.

    Before recent release, nCPU was always set to 1. Now we allow to adjust it. Once we can adjust it without reboot -- we will might just remove nCPU option, and use only CPU %

    The defaults are set to nCPU=1, CPU=25%, so that if it 4+ core server, each site is using at most 1 core (which we found quite effective on big servers), and for people running just one or two core servers -- 25% of total CPU is still efficient at limiting sites to prevent server downtime.
    Igor Seletskiy
    CEO @ Cloud Linux Inc
    http://www.cloudlinux.com
    CloudLinux -- The OS that can make your Shared Hosting stable

  7. #7
    Join Date
    Dec 2007
    Location
    Indiana, USA
    Posts
    16,087
    You need to be more specific as to what you are saying is incorrect Igor, there is a LOT of information posted in this thread

    I do understand your distinction between nCPU and CPU% and how you'd like to have it only be CPU% at some point, but that point is not now

    At the end of the day, all myself and Rick have done is simplified what you're saying for those who are wanting to tweak with it a bit. It is counter-intuitive which is what makes it difficult to grasp. I understand how it works after discussing it with you in-depth in the past but I may not be explaining it quite how I intended
    Michael Denney - MDDHosting LLC
    New shared plans for 2016! Check them out!
    Highly Available Shared, Premium, Reseller, and VPS
    http://www.mddhosting.com/

  8. #8
    Join Date
    Jun 2001
    Location
    Princeton
    Posts
    836
    Michael -- you are right. I think I got myself confused, and the previous post was correct Sorry about that.
    Igor Seletskiy
    CEO @ Cloud Linux Inc
    http://www.cloudlinux.com
    CloudLinux -- The OS that can make your Shared Hosting stable

  9. #9
    Join Date
    Dec 2007
    Location
    Indiana, USA
    Posts
    16,087
    Quote Originally Posted by iseletsk View Post
    Michael -- you are right. I think I got myself confused, and the previous post was correct Sorry about that.
    No problem - I've seen a LOT of posts where people simply spout incorrect information as though it's the truth which ends up giving CL a bad name.
    Michael Denney - MDDHosting LLC
    New shared plans for 2016! Check them out!
    Highly Available Shared, Premium, Reseller, and VPS
    http://www.mddhosting.com/

  10. #10
    Crucial Web Host is offline [email protected]
    Join Date
    Apr 2006
    Location
    Phoenix, AZ, USA
    Posts
    745
    Quote Originally Posted by iseletsk View Post
    Michael -- you are right. I think I got myself confused, and the previous post was correct Sorry about that.
    I appreciate the clarification - and thank you Michael for grasping what I was trying to say.

    After your post, Igor, I had myself in a knot trying to figure out what I had wrong - the stat's just were not jiving.

    Thanks for your confirmation and my apologies if I introduced any confusion into this thread - Just trying to explain it in a way that CL worked today, in a fashion that helped me to understand it.
    CrucialHosting.com - Performance Hosting Solutions:
    SamsClub.com - Walmart.com - Ellusionist.com - CampSaver.com

    Check out our Site Showcase for more big brand examples!

  11. #11
    Join Date
    Nov 2009
    Location
    Neenah, WI
    Posts
    388
    A big Thank You to everyone for the detailed explanation of how this works.

  12. #12
    Join Date
    Mar 2009
    Posts
    2,735
    after modify /etc/container/ve.cfg,should i reboot server,because i do not find any effect after i modify it i think.thanx

  13. #13
    Join Date
    Dec 2007
    Location
    Indiana, USA
    Posts
    16,087
    Quote Originally Posted by ttgt View Post
    after modify /etc/container/ve.cfg,should i reboot server,because i do not find any effect after i modify it i think.thanx
    A reboot would cause the changes to take effect, but then again, so would "lvectl restart".
    Michael Denney - MDDHosting LLC
    New shared plans for 2016! Check them out!
    Highly Available Shared, Premium, Reseller, and VPS
    http://www.mddhosting.com/

  14. #14
    Join Date
    Jun 2001
    Location
    Princeton
    Posts
    836
    It is better to use lvectl then manually change ve.cfg
    That would prevent manual errors.
    Igor Seletskiy
    CEO @ Cloud Linux Inc
    http://www.cloudlinux.com
    CloudLinux -- The OS that can make your Shared Hosting stable

  15. #15
    Considering CloudLinux.

    /Subscribed.

    Cheers

  16. #16
    Join Date
    Mar 2009
    Posts
    2,735
    Quote Originally Posted by iseletsk View Post
    It is better to use lvectl then manually change ve.cfg
    That would prevent manual errors.
    do you mean use lvectl to modify the setting ? or what? could you please tell more detail ? thanx

  17. #17
    Join Date
    Dec 2007
    Location
    Indiana, USA
    Posts
    16,087
    Quote Originally Posted by ttgt View Post
    do you mean use lvectl to modify the setting ? or what? could you please tell more detail ? thanx
    Yes, that is what he means.
    Michael Denney - MDDHosting LLC
    New shared plans for 2016! Check them out!
    Highly Available Shared, Premium, Reseller, and VPS
    http://www.mddhosting.com/

  18. #18
    Join Date
    Mar 2009
    Posts
    2,735
    i re-read the documents,it seems only needing to reboot when modifying LVE_ENABLE ? if i just use lvectl to do the lve setting change,i just need to do /etc/init.d/lvectl reload ,whthout needing reboot,correct? thanx

  19. #19
    Join Date
    Dec 2007
    Location
    Indiana, USA
    Posts
    16,087
    Quote Originally Posted by ttgt View Post
    i re-read the documents,it seems only needing to reboot when modifying LVE_ENABLE ? if i just use lvectl to do the lve setting change,i just need to do /etc/init.d/lvectl reload ,whthout needing reboot,correct? thanx
    Yes, that would be correct. The only time you would need to reboot is if you change the nCPU (cpu count per LVE) . I know that you have to reboot into the LVE kernel to be able to enable LVE but I do believe you can enable/disable LVE without rebooting once in the CL kernel.
    Michael Denney - MDDHosting LLC
    New shared plans for 2016! Check them out!
    Highly Available Shared, Premium, Reseller, and VPS
    http://www.mddhosting.com/

  20. #20
    Join Date
    Mar 2009
    Posts
    2,735

  21. #21
    Crucial Web Host is offline [email protected]
    Join Date
    Apr 2006
    Location
    Phoenix, AZ, USA
    Posts
    745
    You only need to reboot the server when changing the value of LVE_ENABLE and when changing the value of nCPU. Anytime you change the value of either of these you will need to reboot the server for the changes to take affect.

    From the docs regarding LVE_ENABLE;
    You can toggle LVE on/ff by editing
    /etc/sysconfig/lve and setting LVE_ENABLE variable to yes or no.
    Setting it to yes will enable LVE, setting it to no will disable LVE.
    You need to reboot the server, after you set this option to make the changes live
    All other changes to the configuration simply require to reload LVE;

    /etc/init.d/lvectl reload
    CrucialHosting.com - Performance Hosting Solutions:
    SamsClub.com - Walmart.com - Ellusionist.com - CampSaver.com

    Check out our Site Showcase for more big brand examples!

  22. #22
    Join Date
    Mar 2009
    Posts
    2,735
    about the value/setting and calculation on LVE,it seems there are different versions on the thread,which one is correct ?thanx

  23. #23
    Crucial Web Host is offline [email protected]
    Join Date
    Apr 2006
    Location
    Phoenix, AZ, USA
    Posts
    745
    Probably the easiest way to understand it, as it is today -

    http://www.webhostingtalk.com/showpo...62&postcount=5
    CrucialHosting.com - Performance Hosting Solutions:
    SamsClub.com - Walmart.com - Ellusionist.com - CampSaver.com

    Check out our Site Showcase for more big brand examples!

  24. #24
    Join Date
    Mar 2009
    Posts
    2,735
    it seems cloudlinux can not limit ram usage ?thanx

  25. #25
    Join Date
    Dec 2007
    Location
    Indiana, USA
    Posts
    16,087
    Quote Originally Posted by ttgt View Post
    it seems cloudlinux can not limit ram usage ?thanx
    You do, of course, realize that this forum (Web Hosting Talk) is not a CloudLinux Sales or Support avenue right?

    If you have further questions about CloudLinux, I'd highly suggest you visit http://cloudlinux.com/company/contact/
    Michael Denney - MDDHosting LLC
    New shared plans for 2016! Check them out!
    Highly Available Shared, Premium, Reseller, and VPS
    http://www.mddhosting.com/

  26. #26
    Join Date
    Mar 2009
    Posts
    2,735
    im sorry for that,but it is very interesting,the forum is public to let people talk any thing about hosting related issue or KW,if all topic need to go to those product's forum,all people do not talk about centos/tune apache/tune mysql/tune anything,please all go back to product's website,do not post anything on WHT,im not sure we want to talk what on WHT.interesting...

  27. #27
    Join Date
    Dec 2007
    Location
    Indiana, USA
    Posts
    16,087
    Quote Originally Posted by ttgt View Post
    im sorry for that,but it is very interesting,the forum is public to let people talk any thing about hosting related issue or KW,if all topic need to go to those product's forum,all people do not talk about centos/tune apache/tune mysql/tune anything,please all go back to product's website,do not post anything on WHT,im not sure we want to talk what on WHT.interesting...
    You're not discussing CloudLinux - you're asking sales and support questions that can, and should be answered by their sales and support staff.

    There's a difference between discussing CloudLinux, it's performance, and it's merits - and then the questions that you are asking.
    Michael Denney - MDDHosting LLC
    New shared plans for 2016! Check them out!
    Highly Available Shared, Premium, Reseller, and VPS
    http://www.mddhosting.com/

  28. #28
    Join Date
    Mar 2009
    Posts
    2,735
    im sorry,i find your offer thread http://www.webhostingtalk.com/showthread.php?t=1012289 ,why did you not ask the user go to your website to ask any sale question ? and replay directly ? of course,had better go to the product's website to ask question may be better,but WHT is public forum to talk any legal thing about hosting,i do not think i had obey the forum rule.

Similar Threads

  1. CloudLINUX vs CentOS
    By nel$on in forum Hosting Software and Control Panels
    Replies: 54
    Last Post: 01-11-2012, 08:44 AM
  2. Need help with cloudlinux
    By Nick-PresentHosting in forum Dedicated Server
    Replies: 4
    Last Post: 10-17-2010, 02:04 PM
  3. do you use cloudlinux with cpanel ?
    By ttgt in forum Hosting Security and Technology
    Replies: 6
    Last Post: 09-30-2010, 11:05 AM
  4. Replies: 9
    Last Post: 10-10-2006, 10:21 PM
  5. How much/Settings Cobalt Raq4 (Settings Only - via web))
    By EnigmaBiz in forum Employment / Job Offers
    Replies: 1
    Last Post: 02-10-2002, 07:43 PM

Posting Permissions

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