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
  • 833
  • Not directly an answer, but you can replace the Hard Drive with a CF Card e.g. http://gnuru.org/article/1497/installing-linux-on-thinkpad-x40-with-cf-drive –  Feb 15 '12 at 18:39
  • H'm, I know this workaround. Sadly, I bought two micro usb 16 gb USB with the sole purpose of serving as hard disks. Since live usbs work way faster than this install, I believe there is a way to get things right on such a system. I don't strive insane copy speeds, just a decent Facebook machine for my girlfriend :-) – deckoff Feb 15 '12 at 21:20
  • PS. Just checked prices - this seems like a reasonable solution money-wise :) – deckoff Feb 16 '12 at 04:41
  • See also https://askubuntu.com/questions/870638/ubuntu-on-a-usb-stick-mount-options-to-reduce-writes – David d C e Freitas Mar 08 '23 at 18:29

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.

  • I will try in the next few days and report. Thanx for the answer :) – deckoff Feb 16 '12 at 04:36
  • It seems the problem is the USB drive itself - I cloned the installation to other USB drives, and even though the speed reported are similar, the performance of the 'default' USB is significantly slower – deckoff Feb 18 '12 at 07:48
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,127
  • hdparm reports speeds close the the speeds of my hard-drive, but performance of the system is far from the performance of the system when an original hard-disk is used. Thank you for your answer :) – deckoff Feb 16 '12 at 04:37
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
  • 19,519
  • Since the PC runs on 1GB of RAM, I wonder if there are system folders I can leave on the USB, and some that I can squashfs and load to RAM.Any ideas? – deckoff Feb 17 '12 at 12:05
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