I've tried this on t1.micro (PV) and t2.micro (HVM) instances in eu-west-1. To reproduce, I used the following two commands:
sudo apt install docker.io
sudo docker run -p 80:8080 cptactionhank/atlassian-jira
The startup should work, but navigate to http://instanceaddress/ and choose "I'll set it up myself" and "Built In" database. 10-20 seconds after you click "Next", you should see the memory being exhausted and kswapd0 use half of the CPU time.
Test results:
ubuntu/images/ebs-ssd/ubuntu-xenial-16.04-amd64-server-20160721 (PV): kswapd0 OK
ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-20160721 (HVM): kswapd0 high CPU usage
It's worth noting that the memory blocks varies between distro and PV/HVM:
Amazon Linux HVM: /sys/devices/system/memory/memory[0-7]
RHEL 7.2 HVM: /sys/devices/system/memory/memory[0-7]
Ubuntu 16.04 HVM: /sys/devices/system/memory/memory[0-8]
Ubuntu 16.04 PV: /sys/devices/system/memory/memory[0-4]
Why Ubuntu on HVM has an extra memory block is a mystery. It seems to be offline by default, but enabled by the udev hotadd rule. And EC2 doesn't support hotadd.
As Joern Heissler suggested, why not remove the hotadd rule from the official images as a workaround? Although the underlying problem probably is related to why the additional memory block is there at all.
I've tried this on t1.micro (PV) and t2.micro (HVM) instances in eu-west-1. To reproduce, I used the following two commands: atlassian- jira
sudo apt install docker.io
sudo docker run -p 80:8080 cptactionhank/
The startup should work, but navigate to http:// instanceaddress / and choose "I'll set it up myself" and "Built In" database. 10-20 seconds after you click "Next", you should see the memory being exhausted and kswapd0 use half of the CPU time.
Test results: images/ ebs-ssd/ ubuntu- xenial- 16.04-amd64- server- 20160721 (PV): kswapd0 OK images/ hvm-ssd/ ubuntu- xenial- 16.04-amd64- server- 20160721 (HVM): kswapd0 high CPU usage
ubuntu/
ubuntu/
It's worth noting that the memory blocks varies between distro and PV/HVM: system/ memory/ memory[ 0-7] system/ memory/ memory[ 0-7] system/ memory/ memory[ 0-8] system/ memory/ memory[ 0-4]
Amazon Linux HVM: /sys/devices/
RHEL 7.2 HVM: /sys/devices/
Ubuntu 16.04 HVM: /sys/devices/
Ubuntu 16.04 PV: /sys/devices/
Why Ubuntu on HVM has an extra memory block is a mystery. It seems to be offline by default, but enabled by the udev hotadd rule. And EC2 doesn't support hotadd.
As Joern Heissler suggested, why not remove the hotadd rule from the official images as a workaround? Although the underlying problem probably is related to why the additional memory block is there at all.