0

I am currently running Ubuntu 11.10 off of a SanDisk 16GB USB. I installed it using a Live USB with the following partition configuration:

6GB Primary /dos   FAT32
5GB Logical /      ext4
5GB Logical /home  ext4

I don't have a hard disk, and don't see myself getting one anytime soon.

I rely solely on this 16GB, and two other 4GB USBs, one of which I used as the LiveUSB. I bring the USBs around, and even use the install at work.

I previously used an install that used a swap file. It functioned fine for the most part, save for a few slow moments, but I came across this post, and it got me thinking about my USB's life, so I reinstalled with the current config.

My problem now is that it is slower. Applications like Firefox would hang more often. In my previous setup (the automatically partitioned setup), Firefox would start hanging if I was running an unzip or install task on the same partition as /.

Now however, it would hang if I had another window open i.e. the system settings window. My guess is that it may have something to do with the swap file or the install being on a Logical partition rather than a Primary partition, but I don't know.

Any insight as to why it has slowed down?

cesar
  • 121
  • 5
  • There are way to many questions in one :) I would recommend you to split the question into several separate smaller questions - i.e. "how do I move my home directory to another device/partition", "how do I set noatime setting and turn off swap on an SSD" etc. – Sergey Jan 02 '12 at 11:37
  • Thanks for the hint, Sergey. I refined it to a more singular question. – cesar Jan 03 '12 at 14:21

1 Answers1

1

Apart from the fact that accessing the drive via USB is inherently slower than via SATA (i.e. a "normal" HDD or especially SSD will be noticeably/much faster than an USB drive), one cause of your current setup being slower may be partition misalignment. I'm not sure if USB flash drives are any different, but usually SSD drives have large physical sectors so it's important that partitions are aligned with the start of a physical sector.

You can use gparted to check if the partitions are aligned and to re-align them if necessary (you'll need to boot from another USB to make any changes to your current one)

UPDATE: One way to check if a partition is aligned in gparted is to right-click on the partition, select Information from the menu and check First Sector parameter there. Make sure the number there is a multiple of a... err... alignment factor. 1024 (1MB) is a good number to use... so just make sure it's a multiple of 1024:

aligned partition

I'm pretty sure the absence of swap should not make things slower - but you won't be able to use more RAM than you physically have.

Logical partitions are just as fast as primary ones, provided they all aligned properly.

Sergey
  • 43,665
  • How do I confirm if they're aligned? Also, my problem of speed is relative; It used to be able to run okay when I had the swap partition, but now it's slow. – cesar Jan 04 '12 at 01:53
  • I've updated the answer. Regarding the swap - my theory is that your partitions used to be aligned when you had swap but now they're not. But, just in case - how much RAM do you have? – Sergey Jan 04 '12 at 11:38