Possible to give reseller a big chunk of CPU/RAM/DISK IO? (Like disk & bw?)

electric

Well-Known Member
Nov 5, 2001
790
11
318
Hello,

With disk space and bandwidth, it is possible to give a big chunk to a reseller and then the reseller can split them up for their individual cpanel accounts.

Is something like this possible with CPU/RAM/DISK IO using cloudlinux?

For example, we could say that the reseller is allowed to use a maximum of 4 CPU cores, and then they can split that up between their own customers however they desire. Maybe the reseller might create 25 cpanel accounts that each have a limit of 1/2 CPU core maximum. However, since their reseller limit is 4 CPU cores, then at no time could the *total* cpu usage of all their cpanel accounts use any more then their limit.

(Obviously "overselling" would be allowed for this...)

Is this possible? If not, can it be added to cloudlinux ability?

Thanks.
 
Last edited:

iseletsk

Well-Known Member
Verifed Vendor
Re: Possibl to give reseller a big chunk of CPU/RAM/DISK IO? (Like disk &

Electric,

This is not possible right now, and it is questionable to what extent it ever will be possible. While we can do it for CPU & IO, memory is much harder (which user processes to kill in case memory needs to be freed up).
Also, it is not clear how to explain to user why his account was throttled, when he didn't reach the limit (but reseller did).
There are lots of questions -- and we are not sure yet about best strategy to take when implementing it.
 

electric

Well-Known Member
Nov 5, 2001
790
11
318
Re: Possibl to give reseller a big chunk of CPU/RAM/DISK IO? (Like disk &

Hi Igor,

Thanks very much. I think that you will eventually figure this out, don't worry. It is just a matter of time. (I asked the same question of betterlinux and they replied with almost exactly the same response... I think whomever resolves this problem first will be the champion!)

OK... so... let's try and brainstorm some options. :)

Ideally, the feature we want is the ability for resellers "sub-accounts" to be contained within the limit defined for the reseller. So if reseller has a limit of 4 cores, then the combined usage of all their cpanel accounts should never exceed 4 cores.

Let's leave that on the back-burner for now (until it is technically possible) and at least we can discuss how this feature might work.
Also, it is not clear how to explain to user why his account was throttled, when he didn't reach the limit (but reseller did)
What I envision is that when the account is throttled, the user will receive an email (once per day) which says something like:

"Your xyz.com account was throttled for excessive CPU usage and memory usage. Please login to your cpanel account here to see the Resource Usage details. If you have any questions, please contact your hosting provider for assistance."

The idea here is that the website owner is notified that their account was throttled, and they know how to find support about this.

Now... I guess the practical part of this is that when you track each process on the server, you'll need to also figure out who is the "parent" reseller, and keep a running score of how much utilization that parent reseller's total sub-accounts are using.

I hope that helps?

CloudLinux is really working well for us on our shared hosting accounts. We are going to be completely changing how we price and advertise our plans very soon as a result. (Pricing according to cpu/memory/disk io/entry processes, instead of disk and bandwidth.)

It would be nice, then, if we could also do this kind of pricing and account planning for reseller servers, too. :)

Thanks!
 

iseletsk

Well-Known Member
Verifed Vendor
Re: Possibl to give reseller a big chunk of CPU/RAM/DISK IO? (Like disk &

Here is the problem with notifications:
Reseller has 2 cores total.
It gives each customer 1 core, and has 10 customers. 5 of his customers are using 1/2 a core at the same time, but due to upper limit of 2 cores enforced on the reseller, they are unable to use more then 2/5 of a core (which is less then 1/2 of a core that they really want to use, and much less then 1 core that their limit allows for).
So, 5 customers are getting throttled.
What do we say to those customers? None of them even approaching their limits, yet they are throttled. How do we chart it?

There are more details that we need to work through -- were do we show reseller's reports? Should we separate each individual user or reseller, or make it nested.


Also, the CPU limit is the simple part. The real issue is memory limit, where you have to kill off processes.

I think it is something we will be looking at in Q2 2013. Maybe even Q3.
 

electric

Well-Known Member
Nov 5, 2001
790
11
318
Re: Possibl to give reseller a big chunk of CPU/RAM/DISK IO? (Like disk &

Hi Igor,

It is a very good dilemna. :)

First, let me admit that I am not very smart. I am just trying to put some ideas out into the wild so that smarter people then me can take that idea and make it correct, or throw it into the garbage if it's not any good. :)

In my mind, I see this problem is very much like how disk space allocation works now for resellers in WHM. Let's say that a WHM reseller is given a 10gb of disk space allowance, and he creates 10 accounts that each are allowed a maximum of 2gb. This is overselling, of course, and is the most common scenario for 99% of hosting companies. The way it works now, is that each cpanel account can use up to the 2gb maximum the reseller gave them...even though the reseller might be above his total reseller account limit.... so this reseller might have a total of 20gb disk usage even though he is only given a 10gb disk space limit.

The problem is that there is no practical way to limit the individual cpanel accounts, for the exact same reasons you have mentioned in your previous reply. How can we say that the account is not allowed to use all 2gb it is alloted, because their parent reseller is over his reseller account limit? That's not good business.

As a "fix", I have created a script that runs each day and determines what is the total amount of disk space usage for each of the reseller's accounts.. and then sends a notification to the reseller if this total has exceeded their total reseller limit. Then the reseller must contact us to discuss an upgrade of their reseller account, or eventually we will contact them to suspend their reseller account for excessive usage.

I think that perhaps the cloudlinux system for resellers might work in the same way.

For example, let's say the reseller is allowed to have 2 CPU cores total usage. Now he creates 10 accounts that each have a 1 core limit. So everything runs normally like it does now, and cloudlinux keeps track of usage, etc. Then, once a day, cloudlinux runs the "reseller stats process" and it looks at the maximum usage for all cpanel accounts owned by the reseller. It calculates that during the last 24 hours, the combined (at any one time) total number of cores was higher then the limit allowed... so it sends an email to the reseller with the details and suggests they contact the hosting provider to consider upgrading. (ie: The email includes the statistics for all the accounts at the time when the combined total was over, so reseller can see which accounts are using more/less, etc.) Of course this information about each reseller's "last 24 hours of usage" should also be available in the WHM plugin area.

I hope that makes sense?

It is not a perfect solution and does not work in "realtime". However, it is basically good enough. It's sufficient so that the server owner can sell reseller accounts with a CPU limit, and be automatically notified when a reseller is using more then their limit.

This sort of system shouldn't be too difficult to add to the current version. It is mostly just "after the fact" statistics processing...

One additional feature that could also be added to the system above, is that each reseller is not only limited by the TOTAL amount of cpu and/or cpu cores ... but also by the total he can assign to any individual cpanel account he creates. So for example, you could specify a TOTAL limit of 4 cpu cores (as I explained above), but then also limit each cpanel account "under" the reseller to a maximum of say 1/2 core. So this way, all reseller's accounts are automatically limited to 1/2 core maximum, no matter what package they have or any other settings. (And of course, admin can over-ride that limit if desired...)

I hope that also makes sense? The nice thing about a limitation system like that is we can then sell reseller accounts based on the maximum amount of CPU for the created cpanel accounts. (ie: Reseller plan A has cpu max of 1 core. Reseller plan B has cpu max of 2 cores. The TOTAL combined cpu usage might be 6 cores.)

What do you think of something like that?
 

iseletsk

Well-Known Member
Verifed Vendor
Re: Possibl to give reseller a big chunk of CPU/RAM/DISK IO? (Like disk &

We have looked at this approach, and it simplifies the whole thing a lot. We would allow to setup "maximum" CPU/RAM/etc.. that reseller can set per account, and use overall usage to see if reseller goes over the quota.
We might also create some kind of "suspend" feature, if reseller goes well over the quota (which might cause server to go down).

One of the reasons I am not set on this approach is due to our ability to do two level CPU/IO quotas fairly easy. Maybe soft quota + hard quota... Soft quota would basically analyze usage and notify reseller when they go over it, and hard quota would prevent reseller from going over that quota at all.
 

electric

Well-Known Member
Nov 5, 2001
790
11
318
Re: Possibl to give reseller a big chunk of CPU/RAM/DISK IO? (Like disk &

One idea that would be nice, is the ability to set what is the CPU/MEM/DISK IO/etc limits for a reseller account, which would then be applied automatically to all their cpanel accounts. The reseller would be unable to change the limits.

So this way, we can sell "reseller account type A" which might be set to allow reseller to create accounts that have 1/2 CPU core, 246mb limit, etc. And "reseller account type B" wich might allow reseller to create accounts that have 1 CPU core with 512mb RAM limit, etc.

The idea is that each WHM reseller account uses a specific "template" of limits for each of the cpanel accounts they create. This way, we can sell different levels of WHM accounts based on what they want.

So instead of having a single server default for the various limits... we would have a default for each WHM user. When a cpanel account is created, cloudlinux looks at what is the limits default for the parent WHM reseller, and sets the new cpanel account appropriately. If the reseller's defaults are changed, then all cpanel accounts owned by that reseller are also updated. And of course, admin can manually modify any account as desired.

Does that make sense?

So for example, you could add a "Defaults" tab to the LVE WHM plugin. This tab would show something like this:


----------------------
Server Default: [edit]
Reseller A: [edit] [reset] [apply to accounts]
Reseller B: [edit] [reset] [apply to accounts]
Reseller C: [edit] [reset] [apply to accounts]
----------------------

Any cpanel account created by Reseller A would then use the defaults that are specified for that reseller. Clicking hte "apply to accounts" link would update all accounts owned by the reseller so that they use the reseller's default limits.

Nice and simple.
 
Last edited:

iseletsk

Well-Known Member
Verifed Vendor
Re: Possibl to give reseller a big chunk of CPU/RAM/DISK IO? (Like disk &

One idea that would be nice, is the ability to set what is the CPU/MEM/DISK IO/etc limits for a reseller account, which would then be applied automatically to all their cpanel accounts. The reseller would be unable to change the limits.

So this way, we can sell "reseller account type A" which might be set to allow reseller to create accounts that have 1/2 CPU core, 246mb limit, etc. And "reseller account type B" wich might allow reseller to create accounts that have 1 CPU core with 512mb RAM limit, etc.

The idea is that each WHM reseller account uses a specific "template" of limits for each of the cpanel accounts they create. This way, we can sell different levels of WHM accounts based on what they want.

So instead of having a single server default for the various limits... we would have a default for each WHM user. When a cpanel account is created, cloudlinux looks at what is the limits default for the parent WHM reseller, and sets the new cpanel account appropriately. If the reseller's defaults are changed, then all cpanel accounts owned by that reseller are also updated. And of course, admin can manually modify any account as desired.

Does that make sense?

So for example, you could add a "Defaults" tab to the LVE WHM plugin. This tab would show something like this:


----------------------
Server Default: [edit]
Reseller A: [edit] [reset] [apply to accounts]
Reseller B: [edit] [reset] [apply to accounts]
Reseller C: [edit] [reset] [apply to accounts]
----------------------

Any cpanel account created by Reseller A would then use the defaults that are specified for that reseller. Clicking hte "apply to accounts" link would update all accounts owned by the reseller so that they use the reseller's default limits.

Nice and simple.
This is quite simple/easy to do. We will think about it. We might implement all at once, or piece by piece, not sure.
But I like the idea of giving per reseller defaults.
 

electric

Well-Known Member
Nov 5, 2001
790
11
318
Re: Possibl to give reseller a big chunk of CPU/RAM/DISK IO? (Like disk &

This is quite simple/easy to do. We will think about it. We might implement all at once, or piece by piece, not sure.
But I like the idea of giving per reseller defaults.
Thanks Igor. If you would like to bounce any ideas around, please feel free to PM me. Sometimes it is helpful to have a non-technical person give a 2nd opinion.

;)