No swap

It would be nice to have a setting for plans/systems where users cannot use swap.

In my case I don't want users creating swap on new systems or when they edit the disk. It seems they can use swap by default.

I would like to disable this as many clouds don't use or allow swap for performance reasons or if you have a fixed swap pre-configured with images which you don't want to be changed on systems.

Status: 
Closed (fixed)

Comments

It's kind of hard to prevent this, as even if users were prevented from creating a swap disk at VM creation time they could still create a swap file inside the VM later.

Of course they can but the average user will not even bother figuring that out vs selecting it from a click and point option.

The problem is mostly performance. The slowest part in any server are still disks. Most users if they can skip spending more will.

This means vs upgrading a systems with more RAM they will just put a huge swap in it. I see this all the time, since a cloud user does not care about the hardware (its not theirs) they will put a huge swap something completely ridiculous today. Swap is excellent for single server usage or if you know what you are doing.

Swap is overly abused and in a virtual node (where several operating systems are running it can have terrible effects), and some users are still using the double the ram option even when a server has big amounts of ram. If a instance has 32 GB Ram and the user the user puts a 64 GB RAM this is a disaster. Drives are still not that fast to handle that amount of ram to disk, which is just huge to any array. In a cloud node this is nothing but problems, 10 users, 1 GB RAM, each one with 2 GB swap is still 20 GB swap. Make that 50 users and you have 100 GB swap and all of those, at least 90% of those 1 GB ram users will swap because they are trying to run a whole sever with apache, postfix, spam assassin, mysql, and everything else they can squeeze there, so yes, it will swap. Most swap in my experience. There is no hardware that can handle that without having serious performance issues. I cannot see many instances launches like this in any server. It will spin out of control fast.

If you check all the budget clouds, Digital Ocean or even Amazon micro instances, all of them have none swap, exactly for those reasons. The user that can create a file swap is usually a technical one and he understand disk memory is slow and should not be huge either. The user that can select the SWAP size from the interface will just assume the bigger the better since its as easy as typing a number and hitting the create button.

The reason I posted this, is because it seems the only option is to disable the disk management option or create a new instance completely. I don't think this is required and would be extreme. The swap options could be grayed out of fixed per the plan (which would allow a provider to set a limit they want of basically 0 to disable it).

Please consider adding this in some future. I love the fact Cloudmin lets you configure the swap, but I don't want the options for budget plans that don't know what they are doing and are launching their first cloud server ever.

Ok, that makes sense. We will look into adding an option for the next release to prevent system owners from creating new VMs with swap enabled by default.

Please do.

Like I said, in my experience with small environments, all users swap heavily and some actually crash their VM because even with swap they run out of memory. (cheap customers that don't want to pay more) so swap has a very negative effected in a public cloud environment where you don't control the spin up or creation of new VM's.

The more machines running and eventually any server and I mean any server, even with RAID 10 and SSD drives will crawl to a point of no return, SAN storage will also be killed because there are just to many things running on the disk which should not. Swap is for emergencies or certain files, not for using them as RAM and people do this as they don't care about the server or drives and leave that to the provider. I see many abuses with swap, in particular huge swap configurations.

Limiting swap should be in my opinion a feature and most cloud/VPS providers do it for small environments.

If you add this, let the option similar to RAM. Let the provider put a number. Example 1 GB, mean he can only create with a max of 1 GB swap, 0 means he cannot have swap at all or its disabled. This way providers can create plans with some swap, others without it and others letting the user specify the amount like it works today.

Ok, in the next release it will be possible to disable use of swap for new VMs at the owner and plan levels.

Automatically closed -- issue fixed for 2 weeks with no activity.

Automatically closed -- issue fixed for 2 weeks with no activity.