I’m not sure what you mean by:

 

** In above step I choose replace menu.lst **

 

You are correct about not requiring:

 

*** Add

http://ubergarm.github.io/ (** I'm not sure I need to add this line **)

 

I must have left that there as the source of my information – apologies.

 

Yes, reboot is required.

 

 

From: Myungwoo Chun [mailto:mc.tamaki@gmail.com]
Sent: Monday, 11 July 2016 2:34 PM
To: m.corney@tpg.com.au
Cc: domjudge-devel@domjudge.org
Subject: Re: Kernel Parameter on AWS EC2

 

Thank you for fast reply.

 

But I don't solve the problem with this.

I have several questions about the solution.

Please check parts below which I wrap with ** **.

 

My instance is Ubuntu 14.04.03 LTS (trusty).

 

===========================================================================================

sudo -s

apt-get update

apt-get purge linux-image-*

apt-get install linux-image-generic-lts-trusty linux-headers-generic-lts-trusty

** In above step I choose replace menu.lst **

 

# setup kexec to actually run the kernel you chose w/ the GRUB_CMDLINE options

vi /etc/default/grub

GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"

 

vi /etc/init.d/rcS

*** Add

http://ubergarm.github.io/ (** I'm not sure I need to add this line **)

if grep -qv ' kexeced$' /proc/cmdline ;then

   kexec --load /vmlinuz --initrd=/initrd.img --append='root=LABEL=DOROOT cgroup_enable=memory swapaccount=1 kexeced' &&

   mount -o ro,remount / &&

   kexec -e

fi

 

echo "net.ipv4.ip_forward=1" > /etc/sysctl.d/docker.conf

apt-get install kexec-tools

dpkg-reconfigure kexec-tools #yes/yes

 

# install docker (despite the old package name, lxc is optional as of 0.90)

apt-get install docker cgroup-lite lxc

 

# libcontainer is default, but im still running lxc for now

vi /etc/default/docker (** At this step, /etc/default/docker is not existed **)

DOCKER_OPTS="-e lxc"

 

** And then I reboot the instance **

===========================================================================================

 

After the rebooting,

output of "cat /proc/cmdline" is

===

BOOT_IMAGE=/boot/vmlinuz-3.13.0-91-generic root=UUID=736fad7a-387f-4420-b934-4ccbafa26d16 ro console=tty1 console=ttyS0 crashkernel=384M-:128M

===

 

Thank you,

Myungwoo Chun

 

 

On Mon, Jul 11, 2016 at 12:09 PM, Malcolm Corney <m.corney@tpg.com.au> wrote:

I have included the steps below for what I did to enable cgroups on an Amazon EC2 instance.  The instructions are for “saucy” but “saucy” can be replaced with whichever version of Debian/Ubuntu you are running.  Hopefully this will work for you as well.

 

The information comes from:

 

https://gist.github.com/ubergarm/9695532
http://ubergarm.github.io/

Malcolm Corney

 

Alter Boot to allow GRUB loader for CGroups - Required for Amazon Web Services EC2 Instance

=============================================================================================

sudo -s

apt-get update

apt-get purge linux-image-*

apt-get install linux-image-generic-lts-saucy linux-headers-generic-lts-saucy

 

# setup kexec to actually run the kernel you chose w/ the GRUB_CMDLINE options

vi /etc/default/grub

GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"

 

vi /etc/init.d/rcS

*** Add

http://ubergarm.github.io/

if grep -qv ' kexeced$' /proc/cmdline ;then

   kexec --load /vmlinuz --initrd=/initrd.img --append='root=LABEL=DOROOT cgroup_enable=memory swapaccount=1 kexeced' &&

   mount -o ro,remount / &&

   kexec -e

fi

 

echo "net.ipv4.ip_forward=1" > /etc/sysctl.d/docker.conf

apt-get install kexec-tools

dpkg-reconfigure kexec-tools #yes/yes

 

# install docker (despite the old package name, lxc is optional as of 0.90)

apt-get install docker cgroup-lite lxc

 

# libcontainer is default, but im still running lxc for now

vi /etc/default/docker

DOCKER_OPTS="-e lxc"

 

 

 

From: DOMjudge-devel [mailto:domjudge-devel-bounces@domjudge.org] On Behalf Of Myungwoo Chun
Sent: Sunday, 10 July 2016 9:29 PM
To: domjudge-devel@domjudge.org
Subject: Kernel Parameter on AWS EC2

 

Hi,

 

I want to enable cgroups for Java memory issues and running multiple judgedaemons in AWS EC2 Ubuntu 14.04 Server instance.

 

However, I can't add "quiet cgroup_enable=memory swapaccount=1" since AWS EC2 doesn't use grub.

 

Is there any method to add kernel parameters to AWS EC2 instance?

 

Thanks,

Myungwoo Chun