Autoimmune Illness Support Group – Singapore

The first meetup of the Autoimmune Illness Support Group was held at Novena, Singapore today. We had 3 people attend, which is not too bad an effort when there was no advertising of the group’s activity outside of the website!

It was great to be able to share our experiences and information about our conditions with each other. We also talked about how to grow the group and the types of activities that we could organise.

The three people who attended the meetup and their associated conditions:

  • Sherry Soon (livedoid vasculitis and Raynaud’s phenomena) – Organiser
  • Blair Layton (Hashimoto’s thyroiditis)
  • Estan Low (Central D. Insipidus & vitiligo)

The Initial goal for the group is to provide a forum for people to share their stories and understand how others with autoimmune conditions manage their illness(es). Once the group has grown its membership we would like to increase awareness of autoimmune conditions in Singapore and engage health professionals to discuss the latest information on autoimmune conditions.

The Singapore Autoimmune Illness Support Group will hold its next meetup in May. If you are interested in joining please signup at the website and tell us a bit about yourself. We hope you can join our event and benefit from sharing information with other members in the group.

Adding Swap Space to an AWS EC2 Micro Instance

I recently moved some of the WordPress sites on an EC2 m1.small instance in Amazon Web Services (AWS) Singapore data centre to a m1.micro instance in the new Sydney data centre. Unfortunately the new t1.micro instance has run out of memory a couple of times, resulting in the websites being unavailable. After I was notified I had to find out what process/service was killed and restart it.

To stop this happening I could either upgrade to a m1.small instance with 1.7 GiB instead of the 613 MiB, or I could add swap space to the existing server.

I decided to try and save some money by adding swap space to my existing server. There are two main options to do this:

  1. Create an EBS volume and dedicate it to swap space.
  2. Create a swap file on the existing file system (also an EBS volume if you are using an EBS based AMI).

If you decide to add an EBS volume then the smallest size is 1 GB, for which you will have to pay the prevailing monthly rate in the AWS region of your instance. Make sure you put the EBS volume in the same availability zone as your instance or you will not be able to attach it! You will also be charged the I/O costs as data is written to and from the swap space.

With a swap file you only get charged the I/O costs, since you are already paying for the empty space. I still had quite a bit of space available and thought that 512 MB of swap space would be sufficient, so I chose this method.

I’ll describe what I did first and then outline the option using a dedicated EBS volume.

Adding a Swap File

First of I needed to decide where to put the swap file and what to call it. I chose /mnt/swap_512.swap and created it with the following command:

dd if=/dev/zero of=/mnt/swap_512.swap bs=1M count=512

Next I needed to let Linux prepare the file for use as a swap file by using the mkswap command:

mkswap /mnt/swap_512.swap

Finally, I activated the swap file with the swapon command:

swapon /mnt/swap_512.swap

You can check to see if your swap file is being used with top or free. Here is the output from free on my machine:

             total       used       free     shared    buffers     cached
Mem:        615664     592288      23376          0       8548     144448
-/+ buffers/cache:     439292     176372
Swap:       524284        348     523936

You should edit your /etc/fstab file to add the swap file information so that it is available if you restart the instance. This is what my fstab looks like on my t1.micro instance:

LABEL=/     /           ext4    defaults,noatime  1   1
tmpfs       /dev/shm    tmpfs   defaults        0   0
devpts      /dev/pts    devpts  gid=5,mode=620  0   0
sysfs       /sys        sysfs   defaults        0   0
proc        /proc       proc    defaults        0   0
/dev/sdf    /u01        ext4    defaults        0   0
/mnt/swap_512.swap swap swap    defaults        0   0

Note that I have another EBS volume attached for backup purposes that is mounted at /u01.

Adding a Dedicated EBS Volume for Swap Space

First you’ll need to create a new EBS volume in the same region and availability zone as your t1.micro instance. The smallest size is 1GB, which should be more than enough for your swap space.

Once the volume is available you need to attach it to your instance and then note the device so that you can refer to it later. For example, my backup volume is /dev/xvdf with a link to that called /dev/sdf.

There is no need to create the file like the previous example, so you can go straight to preparing the device for use as swap space with the following command:

mkswap -f /dev/xvdf

The -f will force the use of the whole disk, which is what you want.

You can then activate the swap space with:

swapon /dev/xvdf

Again you should edit your /etc/fstab to make sure the swap space is available upon a reboot. Just use my example above, replacing the /mnt/swap_512.swap with /dev/xvdf or your assigned device.


Adding swap space to your AWS EC2 micro instance is quite a simple process that can bring much needed stability (random process kills to keep the machine running are not fun). It can also give you time to catch a memory hogging process before it brings the machine to a halt. However, you do need to monitor your swap usage. If you find that your system is constantly reading and writing to swap then your system’s response time can slow down dramatically. In this case you are truly memory bound and need to upgrade to an m1.small instance.

Samsung Galaxy Note II – Water Damage

On Saturday afternoon I went for a walk around Singapore’s MacRitchie Reservoir to do some exercise and get a bit closer to nature. The whole circuit is about 13 km if you include the HSBC TreeTop Walk. While there are some small huts dotted around the track, there is one part, near the golf course, that has no cover and no huts. This is, of course, where the heavens opened and I ended up jogging in a torrential downpour, giving myself and my Samsung Galaxy Note II a shower.

I quite enjoyed the whole experience, with the rain drowning out any sound of civilization and I could feel my primal instincts activating to dodge the torrents of water pouring down the track which had transformed into a stream in some places.

Unfortunately, my Samsung Galaxy Note II did not like the experience at all. When I finally arrived at some cover I took my phone out of my pocket and hit the button on the side to turn it off. The phone had already turned itself off though, so I unwittingly turned it on. I didn’t want to open the phone and take the battery out, as everything was just too wet. I just had to wait for the phone to turn on so I could shut it down. Alas the red led started to act strangely with different intensities before the phone died.

After wringing my clothes in the change room at the main entrance area I headed home on public transport. I don’t think any taxi driver would have taken me!

When I arrived home I put my Samsung Galaxy Note II in my dry cabinet with the cover off and battery out. The following day the phone did turn on, but the touch screen became non-responsive and the screen flickered like there was some interference. It didn’t look good, so I decided to take everything to pieces again and put it back in the dry cabinet.

Upon searching online for water damage information for a Samsung Galaxy Note II I found out where the water damage indicator is. Apparently the small white square at the top left of the battery compartment, near the battery contacts, is supposed to have a number of small red crosses on it. When water touches the area the crosses bleed into the white area turning the white square into a red one. Well mine was ALL white. I couldn’t believe that had happened from the phone being in my pocket while exposed to rain from a tropical storm.

I took the phone into Samsung today and have to wait for the quote to fix it. Since it’s water damage the warranty does not cover the problem. I hope it’s not going to be too expensive, but the phone will not even turn on now, so it’s not looking good.

If it is expensive to fix it a friend suggested I should get the new Sony Experia Z instead because it’s water proof and would withstand this type of punishment!

Lesson learned – do not take expensive electronic toys into the rain forest without a plastic, rain-proof bag or water damage will ensue!