Ubuntu 11.04 headless omap with / without SWAP

Dear all,

for those who have the similar sluggish start-up problem with ubuntu
11.04 headless on beagleboard xM, you could try to comment out the
following line in /tec/fstab:

'/SWAP.swap none swap sw 0 0'

This is to bring up the 512MB swap file on the SD card at each bootup.
But it takes about 180 s for swapon to finished the IO process, during
which the system becomes very sluggish.

After commenting out the swap file in /etc/fstab, the whole bootup
process can be finished within 85 s (traced with bootchart).

However, there is still some questions from me on the swap of embedded
linux:
- It seems Angstrom (the demo distribution coming with BB-xM Rec. C)
does not use any swap:

root@beagleboard:~# free
             total used free shared buffers
cached
Mem: 496660 134180 362480 0 4836
64920
-/+ buffers/cache: 64424 432236
Swap: 0 0 0

- Why does Ubuntu headless still need 512 MB Swap? Is it safe to
disable swap, given I am only using the BB without X-server?

Best regards,
Hans

Hi Hans,

for those who have the similar sluggish start-up problem with ubuntu
11.04 headless on beagleboard xM, you could try to comment out the
following line in /tec/fstab:

'/SWAP.swap none swap sw 0 0'

This is to bring up the 512MB swap file on the SD card at each bootup.
But it takes about 180 s for swapon to finished the IO process, during
which the system becomes very sluggish.

After commenting out the swap file in /etc/fstab, the whole bootup
process can be finished within 85 s (traced with bootchart).

Wouldn't it have been quicker if they created a partition just for
swap on the SDCard (by marking it as swap in the partition table) and
then using it instead of a swap "file" ?. It seems that bringing up a
512MB file each time would be quite slow.

However, there is still some questions from me on the swap of embedded
linux:
- It seems Angstrom (the demo distribution coming with BB-xM Rec. C)
does not use any swap:

root@beagleboard:~# free
total used free shared buffers
cached
Mem: 496660 134180 362480 0 4836
64920
-/+ buffers/cache: 64424 432236
Swap: 0 0 0

- Why does Ubuntu headless still need 512 MB Swap? Is it safe to
disable swap, given I am only using the BB without X-server?

There are systems that work without any problems with no swap at all.
Most pages in memory are backed by a disk file. I don't forsee a
problem but I think it also depends on how much memory your
application is dynamically allocating. If its just the X-server, I
don't think it would be a problem.

thanks,
Joel

'/SWAP.swap none swap sw 0 0'

This is to bring up the 512MB swap file on the SD card at each bootup.
But it takes about 180 s for swapon to finished the IO process, during
which the system becomes very sluggish.

After commenting out the swap file in /etc/fstab, the whole bootup
process can be finished within 85 s (traced with bootchart).

Wouldn't it have been quicker if they created a partition just for
swap on the SDCard (by marking it as swap in the partition table) and
then using it instead of a swap "file" ?. It seems that bringing up a
512MB file each time would be quite slow.

This also seems to be the approach that the AlwaysInnovating guys have
taken for Ubuntu in their AIOS demo.

thanks,
Joel

Thanks Joel! 512 BM ram is sufficient for our application. So I would
prefer to keep the swap off.

The ubutun 11.04 demo image from Robert looks as a better option. By
default, it has no swap file created unless one uses the --swap_file
<swap file size in MB's> option with the script:

http://elinux.org/BeagleBoardUbuntu#Demo_Image

Regards,
Hans