[Bug 1410824] Re: Swap space with mounts module not working

2015-01-15 Thread Scott Moser
Hi,
  what version of cloud-init are you using?
  This functionality is only availble in trunk since 2014-10-01.  It is only in 
Ubuntu vivid and utopic, not in trusty.

That said, I just launched an instance with this config:
#cloud-config
swap:
 size: auto
 filename: /swap.img
 maxsize: 8G

/var/log/cloud-init.log says:
Jan 15 15:33:18 vivid-20150115-153256 [CLOUDINIT] cc_mounts.py[DEBUG]: suggest 
8182 MB swap for 7984 MB memory with '9092 MB' disk given max=8192 MB [max=8182 
MB]'
Jan 15 15:33:32 vivid-20150115-153256 [CLOUDINIT] util.py[DEBUG]: creating swap 
file '/swap.img' of 8182MB took 14.301 seconds

$  ls -lh /swap.img ; du /swap.img 
-rw--- 1 root root 8.0G Jan 15 15:33 /swap.img
8378372 /swap.img

$ free
 total   used   free sharedbuffers cached
Mem:   81760288009932 166096308   92807680480
-/+ buffers/cache: 3201727855856
Swap:  8378364  08378364

Launching another instance without the specified 'max' gives me:
Jan 15 15:44:41 vivid-20150115-154415 [CLOUDINIT] cc_mounts.py[DEBUG]: suggest 
2273 MB swap for 7984 MB memory with '9092 MB' disk given max=None [max=2273 
MB]'


The algorithm for 'auto' is agreeably nebulus, but I feel that any algoritm is 
going to seem odd/broken for some set.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to cloud-init in Ubuntu.
https://bugs.launchpad.net/bugs/1410824

Title:
  Swap space with mounts module not working

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1410824/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1410824] Re: Swap space with mounts module not working

2015-01-15 Thread trialotto
@Scott,

At the moment, the dd command is being used in version 0.7.6 of cloud-
init, with a noticeable impact on provisioning speed.

Is it possible to use the fallocate command?

This would also be convenient for resizing swap space, for instance by
using fallocate -o option.

Kind regards

PS The impact on provisioning speed can be the result of Azure, since
Azure seems to be have some performance issues at this time.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to cloud-init in Ubuntu.
https://bugs.launchpad.net/bugs/1410824

Title:
  Swap space with mounts module not working

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1410824/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1410824] Re: Swap space with mounts module not working

2015-01-15 Thread trialotto
@Scott,

The output info is not that detailed, I get something like

Jan 16 01:23:12 swap1 [CLOUDINIT] util.py[DEBUG]: Cloud-init v. 0.7.5
finished at Fri.

when creating a Linux VM on Azure, with Ubuntu 14.04.1 LTS.

The cc_mounts.py does certainly not include the new code for the swap
file.

I have no (simple) option to launch a Trusty with a new version of
cloud-init.

A simple Utopic (14.10) launch is indeed creating a persistent swap,
rather stating the obvious.

Can you make this package (version 0.7.6) available for 14.04.1 LTS
(Trusty)? That would be much appreciated.

Furthermore, any documentation would be much appreciated.

Note that I will post some other comments (or bugs, if any) in this
topic, since I am testing some alternative scenarios.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to cloud-init in Ubuntu.
https://bugs.launchpad.net/bugs/1410824

Title:
  Swap space with mounts module not working

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1410824/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1410824] Re: Swap space with mounts module not working

2015-01-15 Thread trialotto
@Scott,

By the way, the release 0.7.6 is ready for packaging, if I am not
mistaken.

Note that the package above AND the 0.7.7 version can be used in Azure
Linux VMs with Ubuntu 14.04.1 LTS (Trusty).

Performance seems to be improving on the Trusty machines, if using the
latest packages.

Also note that upgrading the package in a running VM (Trusty) with
CustomData containing a fixed swap size, will result in a swap with that
fixed size after a shut-down and start sequence (even if a previous
version, such as 0.7.5, did not create swap at all).

The above should imply that on Azure, the custom data option and/or a
datasource can be used to fix swap size at start or restart.

An advantage thereof is that the implementation of a swap size of zero
or another minimum amount, with the possibility to grow the swap size
automatically, in specific circumstances.

These circumstances could or should be:

- changing the VM size (is probably tackled by the cloud-init versions 0.7.6 
and 0.7.7)
- changing swap size manually (in a running VM)
- changing swap size in waagent.conf (if relevant and/or desired)

Kind regards..

PS Please introduce the 0.7.6 in Trusty, that would be a partion
solution to many problems encountered for users of Trusty VMs.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to cloud-init in Ubuntu.
https://bugs.launchpad.net/bugs/1410824

Title:
  Swap space with mounts module not working

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1410824/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs