Bug 611776 - ec2 us-east img=ami-66769e0f, swap is off by default
Summary: ec2 us-east img=ami-66769e0f, swap is off by default
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Cloud Image Validation
Classification: Red Hat
Component: images
Version: unspecified
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jay Greguske
QA Contact: wes hayutin
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-06 13:45 UTC by wes hayutin
Modified: 2011-04-25 17:25 UTC (History)
1 user (show)

(edit)
Clone Of:
(edit)
Last Closed: 2011-04-25 17:25:45 UTC


Attachments (Terms of Use)

Description wes hayutin 2010-07-06 13:45:30 UTC
Tasks:  53 total,   1 running,  52 sleeping,   0 stopped,   0 zombie
Cpu(s):  7.2%us,  1.6%sy,  0.1%ni, 70.7%id,  6.1%wa,  0.0%hi,  0.0%si, 14.3%st
Mem:   1740976k total,   246900k used,  1494076k free,     8112k buffers
Swap:        0k total,        0k used,        0k free,   161544k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                  
    1 root      15   0  2172  676  580 S  0.0  0.0   0:00.11 init                                                     
    2 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 migration/0                                              
    3 root      34  19     0    0    0 S  0.0  0.0   0:00.00 ksoftirqd/0                                              
    4 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/0   

[root@ip-10-202-159-230 ~]# /sbin/swapon /dev/sda3
[root@ip-10-202-159-230 ~]# top

top - 09:44:56 up 4 min,  1 user,  load average: 0.07, 0.15, 0.08
Tasks:  53 total,   1 running,  52 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   1740976k total,   247516k used,  1493460k free,     8196k buffers
Swap:   917496k total,        0k used,   917496k free,   161544k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                  
    1 root      15   0  2172  676  580 S  0.0  0.0   0:00.11 init                                                     
    2 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 migration/0

Comment 1 Jay Greguske 2010-07-06 18:23:38 UTC
For large and extra-large instance types, no swap "device" is exposed, so I think having swap default to off is expected.

We could have a filesystem-level swap partition though, and use that for all instance types, but I don't know if that is a path we want to go down... that's a PM decision. We'd need this in the %post section of the ks file:

dd if=/dev/zero of=/swapfile bs=1024 count=$(($SWAP_SIZE_MEGABYTES*1024))    
mkswap /swapfile

Then later in an initscript:

swapon /swapfile    
echo Swap Status:    
swapon -s  

I do not think we should pursue this for the imminent 5.5 kernel 2 update, but possibly in a future release.

Comment 2 Jay Greguske 2010-07-06 20:10:24 UTC
Forget about comment 1, after a little more investigation I realized I left out the fstab logic in the KS file when I merged i386 and x86_64 versions into one file. This should be fixed now: 32-bit instances should have swap enabled on boot, 64-bit instance should have any swap defined.

See the EC2 docs for information on what should be exposed:

http://docs.amazonwebservices.com/AWSEC2/latest/DeveloperGuide/index.html?instance-storage-concepts.html

Comment 3 Jay Greguske 2011-04-25 17:25:45 UTC
Cleaning out old bugs. Feel free to reopen if you feel this one was closed in error.


Note You need to log in before you can comment on or make changes to this bug.