You are not logged in.
Pages: 1
Topic closed
I have Arch installed to a USB stick to use as a portable workstation, and I'm using dm-crypt (with cryptsetup/LUKS) to secure the root partition.
The target laptop has plenty of horsepower - an i7 and 8GB RAM. The drive is a Kingston HyperX Savage USB 3.1 (HXS3/128GB) with advertised throughput of 350MB/s R, 250MB/s W.
/dev/sdX1 - 100M unencrypted ext4 for /boot
/dev/sdX2 - 100G dm-crypt/LUKS ext4 for /
I formatted the luks container with the options
--verbose --verify-passphrase --cipher=aes-xts-plain64 --key-size=512 --hash=sha512 --iter-time=10000 --use-random
I wonder if there are any I/O optimizations I can make, given this configuration? Lower latency on small file read/write is more important than sustained sequential throughput (my workload is primarily web browsing and ruby development, not say gaming or video streaming/editing). With the i7, I can yield some CPU time to optimize disk ops if that's a decision point.
Maybe there are more/different luks parameters I could have used? Some dm-crypt flags I should set in the bootloader? Perhaps tweaking some kernel settings (such as filesystem caching pressure or flushing parameters)? I don't know what I don't know, so these are only vague guesses.
Last edited by cmtonkinson (2016-06-30 01:19:03)
Offline
I should clarify that the primary goal is decreasing the overall latency of a gnome-shell environment (but most of my time is spent in a browser or text editor).
Offline
I doubt very much whether the bottleneck in this situation is going to be dm-crypt, with a modern processor with onboard AES instructions the overhead is negligible anyway.
Your better off just doing the standard optimizations for a USB drive like disabling ext4 journaling, mounting with the noatime option, changing the scheduler, using preload, storing firefox profiles in RAM etc...
Offline
Also try other filesystems. In my experience f2fs will perform better on usb flash drives than ext4 or btrfs. Mind you that I've done my last test a good while ago so things may be different now.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
Running cryptsetup test utility shows that on RAM using 256 instead of 512 (both sha and key size) increases performance.
Offline
Running cryptsetup test utility shows that on RAM using 256 instead of 512 (both sha and key size) increases performance.
Not relevant and necro-bumping, closing.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
Pages: 1
Topic closed