Using USB Memory Stick to Improve Performance
Siggy Brentrup
ubuntu at psycho.i21k.de
Mon Sep 7 06:06:04 UTC 2009
On Sun, Sep 06, 2009 at 20:18 -0700, David Fox wrote:
> On Sun, Sep 6, 2009 at 2:42 PM, Siggy Brentrup<ubuntu at psycho.i21k.de> wrote:
>
> > With my now comparatively low end Vaio laptop that I'm running Ubuntu
> > on I experienced a lot of interrupted music and freezing GUIs during
> > the past weeks. I found out that this is primarily caused by disk
> > accesses to mmap'd shared libraries involving slow mechanical
> > movements of the disk heads.
>
> Possibly. Is this with just one application, or a general symptom? How
> is the RAM on that system?
It's a general symptom, RAM is still 512MiB upgradable to 1GiB but I
don't find an affordable source (buying from Sony is too expensive
now after >5years w/o a paid job due to illness).
> Are you noticing a lot of extra processes running, or more swap use
> than might be normal?
> I'm sceptical of using a USB stick for the purpose you describe.
> (There was another thread that was related to this, which I almost
> commented on: using a usb stick in an elaborate "cache" setup,
> presumably because USB was faster.) While USB sticks have no moving
> parts, I'm pretty sure that disk accesses (reads) are slower than
> using the internal HD.drive.
Sustained USB transmission rates can be rather slow, if there were a
cheap firewire stick I would use one. But mechanical movements are
slower, after all caching is primarily done to avoid them.
> My feeling is that you've lately got a total application "footprint"
> that is too much for your machine's resources (that could include
> whatever DE you're running, other apps, and so forth). in general,
> using Linux for what it was designed for (VFS layer disk caching)
> means that adding more RAM to the machine will increase performance
> over and above other creative methods.
Your assumptions are all valid, one of my preferred advices when
consulting in the past has always been "There is nothing to boost
performance over *real physical memory*". If I could afford it now
I'd buy a new box that runs cycles around my Vaio for less than a
third of the price I paid for it in Dec 2003. This whole thing is
about extending the box's life for some months without investing
money I don't have, brain and time are free as in free beer.
> Of course, on desktops (especially with ones with varying speeds of
> access, RPMs etc) it is advantageous to put frequently-used parts of
> the system on different partitions, or even different spindles - and
> have interleaving swap (one partition on one drive one on the other)
> But I'm not so sure that this will work with a USB stick.
Here are some preliminary numbers from the boot sequence:
w/o stick w/ stick
161 secs 105 secs
Kernel logs:
http://pastebin.com/m34405111 http://pastebin.com/m2d048a47
significant differences show up only near the end, highlights set.
These numbers are by no means representative but they support my
impression that applications in general are noticebly faster.
> I also think that having a system library (/lib - that's part of the
> root partition) on a usb stick is asking for trouble. But I've never
> actually tried doing this.
In the text you're not citing below I try to cope with this, and
important data are automagically rsync'd to my backup server every 3
hours anyway.
> > Now it's cheap and easy to eliminate these movements if you have /lib
> > and /usr/lib on a 4GB memory stick. Both are mounted ro because
>
> What you might want to do is run strace on one of those apps just to
> see how frequently the shared libraries are accessed.
cf. numbers above, mmap'd libs are not swapped out iirc.
Thanks for your comments
Siggy
--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org+
|39 days until|bsb-at-psycho-dot-informationsanarchistik-dot-de|
|www.Ubucon.de|or: bsb-at-psycho-dot-i21k-dot-de|
+-------> ceterum censeo javascriptum esse restrictam <--------+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20090907/7bd97d91/attachment.sig>
More information about the ubuntu-users
mailing list