PCLinuxOS-Forums
News: ...FLASH!!! ...New PCLinuxOS Testing board now open. Register today! Be an active contributor to the PCLinuxOS future! ... Read all about it now, on THIS forum!!!..
 
*
Welcome, Guest. Please login or register. May 27, 2012, 02:23:42 PM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: USB install much slower than LiveUSB with persistence?  (Read 668 times)
gseaman
PCLinuxOS Tester
Hero Member
*******
Online Online

Posts: 2808



« on: June 28, 2011, 01:21:48 AM »

I installed the brand new LXDE iso to a USB thumb drive. I have 1.5 gb left on a 4.0 drive. Previously, I had used PCLinuxOS LiveUSB Installer to install three different test isos and they seemed to run significantly faster than a livecd. But after installing to the flash drive it is very slow. Although, I've been here a long time, this is the first time using a flash drive this way. Also, I 'cat /proc/swaps' shows that my swap on the hard drive is in use.

Galen
Logged
pags
Hero Member
*****
Offline Offline

Posts: 1951


Keep it clean.


« Reply #1 on: July 05, 2011, 10:33:10 AM »

I would suspect that the fact that the installed system performs writes (which are inherently, significantly slower on flash media than reads), which the LiveUSB does not, will significantly impact performance.

I've setup an EeePC 701 to run from a 16GB SD card, and I did many things such as minimize logging (in my case, I disabled swap altogether, because there is no HDD to compensate, as you've done), adjusted mount options to include "noatime", to reduce writing updated access times to files...there are others I can't think of off the top of my head...I'd have to check.
Logged
gseaman
PCLinuxOS Tester
Hero Member
*******
Online Online

Posts: 2808



« Reply #2 on: July 05, 2011, 12:53:32 PM »

Thanks for the reply. When I get a chance, I'll try it.

Galen
Logged
Just18
PCLinuxOS Tester
Hero Member
*******
Offline Offline

Posts: 4634


MLUs Forever!


« Reply #3 on: July 05, 2011, 01:03:26 PM »

Maybe the best would be   relatime   rather than   noatime.

Either way, a full install to flash memory is likely to wear out the flash stick prematurely, which is why it is discouraged by most.

Logged

MLUs rule the roost!

Linux XPS 3.2.17-pclos1.pae.bfs  32 bit
Intel(R) Core(TM)2 Quad  CPU   Q9450  @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech ‎DVB-T 2 USB DTT
pags
Hero Member
*****
Offline Offline

Posts: 1951


Keep it clean.


« Reply #4 on: July 05, 2011, 01:14:02 PM »

relatime...hmmm.

Quote
To summarize, relatime is a good compromise between  atime (most expensive) and noatime (least expensive).

From here.

Also in that same article is mention of data-writeback:
Quote
But yeah, “noatime,data=writeback” will quite likely be *quite* noticeable (with different effects for different loads), but almost nobody actually runs that way.


IIRC, that's another option I used, in addition to removing the journal (for ext4)...I can't connect to the EeePC at the moment, so I can't confirm everything I did, yet.
Logged
pags
Hero Member
*****
Offline Offline

Posts: 1951


Keep it clean.


« Reply #5 on: July 05, 2011, 02:02:43 PM »

OK.  I did some checking (feel free to use alternatives as they are presented).

The additional mount options I'm using are:
noatime,nodiratime,data=writeback

I removed the journal from my ext4 filesystem (because I failed to provide the provide options when creating it) with:
tune2fs -O ^has_journal /path/to/device/partition

I put /tmp in RAM by setting "Clean /tmp at each boot" in:
pcc> Boot> Set up boot system> Advanced> select the checkbox beside "Clean /tmp at each boot"

...and I made sure the user's tmp directories were symlinks to /tmp.

These were just things I did to minimize writing to the flash device to improve performance and prolong the longevity of the device (hopefully).
Logged
AS
Global Moderator
Hero Member
*****
Offline Offline

Posts: 4139

Have a nice ... night!


« Reply #6 on: July 05, 2011, 02:13:21 PM »

OK.  I did some checking (feel free to use alternatives as they are presented).

The additional mount options I'm using are:
noatime,nodiratime,data=writeback

I removed the journal from my ext4 filesystem (because I failed to provide the provide options when creating it) with:
tune2fs -O ^has_journal /path/to/device/partition

I put /tmp in RAM by setting "Clean /tmp at each boot" in:
pcc> Boot> Set up boot system> Advanced> select the checkbox beside "Clean /tmp at each boot"

...and I made sure the user's tmp directories were symlinks to /tmp.

These were just things I did to minimize writing to the flash device to improve performance and prolong the longevity of the device (hopefully).

Hi pags,

please, let me add a note:

if you remove journal, you don't need the option data=writeback because that option affect only journal writes.

if you leave there the journal, may be interesting to retain the option data=writeback, and to add the option commit=60, where 60 is the maximum number of seconds between journal commits (default is 5 secs).

data= and commit= options apply to ext3 and ext4 filesystems, not to ext2.

AS
Logged
gseaman
PCLinuxOS Tester
Hero Member
*******
Online Online

Posts: 2808



« Reply #7 on: July 05, 2011, 02:16:39 PM »

Thank you for all of the feedback. What does this statement mean?

I removed the journal from my ext4 filesystem (because I failed to provide the provide options when creating it) with:
tune2fs -O ^has_journal /path/to/device/partition

Galen
Logged
pags
Hero Member
*****
Offline Offline

Posts: 1951


Keep it clean.


« Reply #8 on: July 05, 2011, 02:31:22 PM »

Thank you for all of the feedback. What does this statement mean?

I removed the journal from my ext4 filesystem (because I failed to provide the provide options when creating it) with:
tune2fs -O ^has_journal /path/to/device/partition

Galen

When running mke2fs, there are options available to disable the creation of the journal.  If you're willing to run an ext4 fs without a journal (potentially an issue if the filesystem needs to be checked, as it would have to check the entire thing, like an ext2 filesystem), you can reduce the number of writes (because there is no journal to write to).  Potentially good for flash device, potentially bad if there is a bad shutdown, etc.

Oh...I see I made a typo (an extra "provide").  Sorry.  It should read:
Quote
because I failed to provide the provide options when creating it
Embarrassed
Logged
gseaman
PCLinuxOS Tester
Hero Member
*******
Online Online

Posts: 2808



« Reply #9 on: July 05, 2011, 02:36:23 PM »

Got it. Thanks.

Galen
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM