Re: Swap file on USB



General Schvantzkopf (schvantzkopf@xxxxxxxxx) writes:
On Fri, 09 Nov 2007 14:55:54 +0000, Theo Markettos wrote:

I have a Netgear wireless router (a WGT634U) on which I've installed
Debian. It has 32MB SDRAM built in, in a way which isn't upgradable
(well, some serious soldering would be required). I'm running some apps
on it which are using up most of the RAM, and I want to run some more
which will be idle much of the time (specifically I want a webserver and
SQL database).

The only interface the router has is a USB port. Currently I have the
root ext2 partition mounted with -o noatime on a 2GB Kingston flash
stick, which seems to get reasonable performance (about 17MB/s read,
8MB/s write I think). I've given it a 128MB swap partition on the
flash, but I don't think this gets used too much.

But I'm probably going to be swapping a lot more with the extra apps.
Any suggestions of the best way to run a swap file on USB? I don't want
a hard drive - I want a low power router. I can think of:


1) Just use the flash as swap until it wears out, then replace it. Will
wearout trash the other data on it, or will it just start returning disc
errors and/or garbage for the swap sectors and leave the rest unchanged?

2) Get another flash stick for swap. Easier to replace but means I need
a USB hub (the router doesn't have a huge amount of power to spare so
it'd probably be a powered one)

3) Does anyone do RAM on USB?

4) Use an IBM microdrive in a CF-USB adaptor. Would probably need it in
addition to the existing flash stick

5) Some kind of swapfile driver that tries to optimise writes to the
medium?

6) Wear leveling over both partitions so that just the swap part uses
writes from the root partition


Any thoughts?

Thanks
Theo

Why are you trying to run a server on a router? Don't you have an old PC
laying around that you could use? Anything would be better than a router
with only 32M of RAM in it.

Surely one reason is that a whole computer takes up space, but a router
is relatively small.

I imagine the novelty is part of it all. I have seen articles about
using such routers as dedicated Linux controllers, because they are
relatively inexpensive, and commonly available. They are being treated
as a new wave of single board controllers, much in the same way that
circa 1982 there was an article in Kilobaud about using a single board
computer that had an ascii keyboard built in because it was cheaper
to buy those than do development on a dedicated computer and build
them in a pretty limited number.

Michael
.



Relevant Pages

  • Re: Swap file on USB
    ... The only interface the router has is a USB port. ... I've given it a 128MB swap partition on the ... flash, but I don't think this gets used too much. ... Any suggestions of the best way to run a swap file on USB? ...
    (comp.os.linux.hardware)
  • Swap file on USB
    ... I have a Netgear wireless router on which I've installed Debian. ... I've given it a 128MB swap partition on the flash, ...
    (comp.os.linux.hardware)
  • Re: Swap file on USB
    ... The only interface the router has is a USB port. ... I've given it a 128MB swap partition on the flash, ...
    (comp.os.linux.hardware)
  • FW: FW: [SLE] Urgent! Need help!
    ... >>router and that took care of the problem. ... re-boot and it just hangs with the word GRUB sitting there. ... removed that Windows partition, and moved everything to the top. ... a clean boot out off of the installation CD, I'd be able to then re-write ...
    (SuSE)
  • Re: BEFSX41 Firmware FYI
    ... I didn't realize that you have to flash it with no other network activity ... Wallwatcher and Wallreviewer work fine (I run ... thinks it's a BEFS series router. ... an amateur built the Ark; ...
    (comp.security.firewalls)