Bandwidth Limits in Cloudmin
Cloudmin uses the term "bandwidth limit" to mean a restriction on the total amount of data that can be transferred into or out of a virtual system in some time period, such as a week, month or the last 10 days. This is counted by periodically sampling the byte counts on the network interfaces on the host system that are connected to each virtual system, and recording the change - typically, this sampling is done every 5 minutes.
Each virtual system can have its own bandwidth limit, although all limits are defined as a number of bytes over the same account period. If a system exceeds its limit, an email can be sent to the owner or master administrator, and the system optionally shut down. When using for the accounting period drops below the limit, it will be started up again.
Network Rate Limits in Cloudmin
Xen and OpenVZ virtual systems can also have a limit set on the rate at which they can send and receive data. By default a system can consume all of the network capacity of the host, which may lead to other virtual systems being starved for capacity. Cloudmin can set a limit like 10 MBps, which would leave plenty of space for other systems on a 1 GBps host network interface.
This can be particularly useful if you have to pay for upstream bandwidth to the Internet, and want to prevent a single customer's system from consuming vast amounts of expensive network capacity.
Enabling Bandwidth Monitoring
Before Cloudmin will start tracking bandwidth use on virtual systems, monitoring must be enabled. This can be done as follows :
- Login to the Cloudmin UI as root, and go to Cloudmin Settings -> Bandwidth Monitoring.
- Change Bandwidth monitoring enabled? to Yes, and select an accounting period in the Monitoring period field.
- Customize the email messages if you want to. Various template variables like
$IPcan be used.
- Enter your address in the Email address to notify field, then click Save.
Once this done, wait for an hour or two for some bandwidth statistics to be collected. You can then view the current usage for each virtual system on its Edit System page, and in the graphs described below.
Once bandwidth monitoring is enabled, you can view a graph of usage for a single system by selecting it from the left menu, and going to Resources -> Bandwidth Graph. Or you can view usage for multiple systems at Cloudmin Settings -> Overall Bandwidth Graph.
Setting Limits in Cloudmin
Both bandwidth and network rate limits can be set for a system at Resources -> Resource Limits. The bandwidth limit can be changed without any effect on the system, but for Xen instances the network rate change requires a reboot. OpenVZ containers can have their network rate changed immediately though.
Bandwidth Limits and System Owners
System owners can freely set bandwidth and network rate limits on virtual systems they own, with no enforced upper limit. However, the owner's plan may define a bandwidth limit, which applies to the sum total of usage across all virtual systems he owns. If this is exceeded a warning email will be set to the master administrator and the owner, but no systems will be shut down.