5

The setup:

Thinkpad x40 without harddisk, 1GB of RAM. The hard-disks for these models are very slow, rare and expensive. This is why I installed Ubuntu 11.10 onto the USB. The system will be used for net - FF, and some office docs editing. If possible, I might setup a second PC, used for XBMC.

I have tried live Ubuntu USBs with the same PC and USB, and the setup is OK. I am limited to 4 GBs, though. This is why I chose to perform normal install.

The problems:

The system feels slow, and freezes every other second. I have no swap, only one root partition.

What I have tried:

sudo apt-get install preload

Use memory instead of disk

Add these lines to /etc/sysctl.conf, and reboot.

vm.swappiness = 0
vm.dirty_background_ratio = 20
vm.dirty_expire_centisecs = 0
vm.dirty_ratio = 80
vm.dirty_writeback_centisecs = 0

Mount /tmp onto ramdisk Code:

mkdir /dev/shm/tmp
chmod 1777 /dev/shm/tmp
mount --bind /dev/shm/tmp /tmp

Still, the system is slow to the point of being unusable. Are there any other tweaks that can be done. I read that some parts of the system might be mounted into RAM, and that would be beneficial, but which parts and how to do that. I also read that compressing parts of the system might help, I dont know how to do that , too


deckoff
  • 843

4 Answers4

1

I think that hardware controller can be USB-1.1 and no real USB-2.0, thats why its slow, you can try add Swap into ANOTHER USB.

1

To fully understand the output I would first check this

hdparm -tT /dev/sdc 

where as your /device/assumed "sdc" replace with correct path. Check your results.

There is a bug report and a fix by modifying /etc/initramfs-tools/modules and adding two lines:

/etc/initramfs-tools/modules:

ohci_hcd

ehci_hcd

ref: https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.17/+bug/66115/comments/5

also some reference here: http://ocaoimh.ie/2009/05/07/ubuntu-linux-slow-external-usb-drive/

Ringtail
  • 16,285
1

Info on running Ubuntu from RAM:

http://ubuntuforums.org/showthread.php?t=1594694

You can get away from the 4GB Persistence limit of the casper-rw file by using casper-rw and home-rw partitions.

C.S.Cameron
  • 20,530
  • 12
  • 78
  • 125
0

Xubuntu 14.04 LTS + Firefox 28.0

I had issues using a browser (Firefox) on a Ubuntu that started from USB. I think this is because the browser will write a lot of small files into the cache into the /home/user/.mozilla folder.

Before, I already changed my /tmp to a folder in RAM by adding the following line into /etc/fstab

tmpfs /tmp tmpfs defaults,noatime,nosuid,nodev,noexec,mode=1777,size=1024M 0 0

I found the hidden browser.cache.disk.parent_directory setting to redirect the cache to /tmp/cache, so the cache will be stored to RAM.

Of course this loses the cache everytime you restart the computer, but I hoped (without actually benchmarking it against switching off the cache completely) that it speeds up surfing at least if you stay on one page (let's say Amazon) for one session. I noticed a big speed up against caching on the USB drive.

Holger
  • 1