Skip to content

Optimize an Arch install on a USB 3.0 flash drive?

I have Arch installed to a Lexar P20 32GB and was wondering what can be done to make the experience better.

I have it in a 3.0 port, 512MB FAT32 boot, rest of it partitioned as EXT4. I do have noatime set in fstab. Runs mostly ok but has the occasional freeze up especially when running Firefox.

Would switching to F2FS maybe help, and is there anything else I can do even on the EXT4 install to stop the lockups?

EDIT: To the person(s) that keep downvoting posts, why? I see a ton of legitimate posts that are just sitting at 0.

Edited 12 May 2016. We only hold this version.

56 points46 comments
Open on Reddit
About this post
Posted
Archived
Edited
Score
56 · 100% up
Kind
Text
ID
4j1daq

Author

96
posts
2.5k
comments
41
media
View profile

47 comments

Well, F2FS from my experience on ssd grants an improvement worth switching. Also you could try (if you haven't tried already):

  • Using a window manager like i3wm or something even lighter
  • Switch to terminal applications (like midnight commander for file management, mpv for video, generally - as lightweight as it can be)

Adressing the firefox problem, are you sure you are not running out of RAM?

Generally speaking, having OS on USB 3.0 pendrive is obviously going to bottleneck it unless your pendrive has over 100 MB/s read/write.

P.S. Your boot partition is too big. If you are not using multiple system images you can shrink it to 256 MB (that's safe for me) or even something around 128 megabytes.

9 points

That's what I was thinking pertaining to F2FS. I'll redo the stick later and try it out.

Yeah the Firefox issue is just little lockups probably due to the IO bottleneck.

This is more of a portable drive so I left it as 512 so I could have a little storage accessible on Windows.

Thanks for the suggestions.

EDIT: Turns out Windows refuses to mount the FAT32 partition. I even tried in diskpart and it just spits out something about not being able to assign a removable disk.

2 points

I see a lot of people saying that f2fs is either not really built for SSDs or doesn't give much benefit on them. Have you noticed otherwise?

1 points

Considering some benchmarks, f2fs is a bit faster than ext4 on ssd. Also it hands down conserves ssd's better by just not caching as much data as ext4 to extend live of ssd's sectors.

1 points

After trying many Flash drives, the one that stands above all is SanDisk Extreme 32GB USB 3.0 Flash Drive (SDCZ80-032G-GAM46)

I run Arch on one, and Fedora on another. I am extremely happy with the performance of both. No freezes, no slow shutdowns or startups, apps start quickly. I've run both gnome and i3. Pacman and dnf updates absolutely fly. I run Firefox and chrome well. IMO, they are obviously better performing than a spinning disk, and compete with SSD's, in my experience. I saw transfers speeds of 100MB/secs write and 200MB/sec reads, which of course vary by file sizes, etc.

I use EXT4, plugged into a USB 3 port on my 16GB T440p, with grub on the USB. Few other optimizations.

I would try this disk; it's pretty cheap to find out.

Good luck.

2 points

The drive I picked up was hitting 275MB/s raw read (dd to /dev/zero) Pretty happy with it so far.

1 points
unknown author

Deleted before we saved it.

1 points

I can't answer the actual question as I've never delved into that, but I can answer your edit: The RES calculates vote-statistics, you're lazy (we all judge) or have some issues with reading (I don't judge. I got friends with reading disorders).

Any post that has negative votes automatically shows 0. However, when opening a post, I can see "X points (Y% upvoted), Z votes". I assume that's RES-specific though.

2 points

Well vote-fuzzing doesn't go into effect until more votes, as far as I'm aware. I saw 0 with 50% upvoted which means I was downvoted at least once. It doesn't really make any difference to me. It just starts to bother me when I see a lot more posts on this subreddit like that.

1 points

Do you see total votes? Because that's an issue. 50% basically means 0. You're creating a post, and your upvote is automatically attached to that. Someone downvotes that, and now you're at 0, or 50%. For example, your post has 19 points (85% upvoted), 27 votes (right now).

...

Well this is fun. Apparently the RES plugin keeps a tally. I can see any number of points that isn't negative, and I can see a percentage, but not the number of votes. So, RES keeps vote statistics, otherwise some posts would be in the negative hundreds.

2 points

Another option instead of F2FS might be Btrfs with inline compression, since inline compression will reduce read/write.

2 points

I went down this route for about a month. Tried everything in the book, and was not really satisfied with the results. Its funny I even see this post. I was scrolling through my front page as i was contemplating just erasing the drive.

Truth be told, it just seemed like if i used it fora while it was fine. But after the system was on for awhile, idle. It would just be junk afterwards.

1 points
unknown author

I had the same lockup problem. I turned off journaling and the lockups stopped. Everything ran much smoother.

1 points

Disabling/moving swap will likely make a huge difference. Firefox loves paging to disk, and a flash drive will not take that well.

0 points

That's not how swap works. Swapping is done by the kernel, which Firefox can't influence. Swapping only takes effect when the system is out of memory and programs would otherwise be forcibly terminated.

2 points

and was wondering what can be done to make the experience better.

Use a real hard drive?

And I didn't downvote you - but some of them might be from your post title. There isn't really anything to 'optimize'. If you use a USB drive for this, it's going to have some problems.

USB 3.0 is fast for large, 'solid' file transfers, but for many small files - like an operating system - you're going to have some delays with random read/writes.

Cache as much as you can in RAM, especially Firefox.

0 points

I built this install as a "boot on everything, do anything" kind of thing. Works on BIOS/EFI and I loaded down with a bunch of tools in case any of the computers on the floor (work at a callcenter) go down. Considering its use, the lockups aren't as big of a deal but I was just trying to see what all could be done. I see the Firefox on RAM also mentioned above. Will give it a shot, thanks!

EDIT: Wow, profile-sync-daemon completely eliminated the lockups in Firefox. So yeah the caching was killing the performance.

3 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.