Bug 611776 - ec2 us-east img=ami-66769e0f, swap is off by default
ec2 us-east img=ami-66769e0f, swap is off by default
Status: CLOSED CURRENTRELEASE
Product: Cloud Image Validation
Classification: Red Hat
Component: images (Show other bugs)
unspecified
All Linux
low Severity medium
: ---
: ---
Assigned To: Jay Greguske
wes hayutin
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-06 09:45 EDT by wes hayutin
Modified: 2011-04-25 13:25 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-04-25 13:25:45 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description wes hayutin 2010-07-06 09:45:30 EDT
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 14:23:38 EDT
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 16:10:24 EDT
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 13:25:45 EDT
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.