moving sawp file to USB thumb drive

Silencing hard drives, optical drives and other storage devices

Moderators: NeilBlanchard, Ralf Hutter, sthayashi, Lawrence Lee

Post Reply
nzimmers
Posts: 271
Joined: Mon Dec 04, 2006 6:13 pm

moving sawp file to USB thumb drive

Post by nzimmers » Fri Jan 26, 2007 7:46 am

just a quick question, I have a small server that I am building, 3 drives - one notebook and 2 desktop drives in it. I have the desktop drives set to spin down after about 10 minutes, and that workd well - reduces my power consumption by about 10 watts, but I was thinking that maybe I could improve things a little more by having windows swap file on a USB thumbdrive instead of on the C' drive, I know it would negatively impact performance, but .....would it improve power efficiency?

disphenoidal
Posts: 333
Joined: Wed Apr 05, 2006 9:54 pm
Location: USA

Post by disphenoidal » Fri Jan 26, 2007 8:39 am

Flash memory has a finite lifetime, on the order of 100,000 writes. I don't know how long it would take you to deplete that, but you would have to keep replacing the flash drives as they wore out. Throwing out all those flash drives would be a lot more wasteful than not spinning down a drive.

vincentfox
Posts: 271
Joined: Sun Oct 09, 2005 8:35 pm
Location: CA

Post by vincentfox » Fri Jan 26, 2007 8:47 am

The flash-write limit is over-blown in my opinion. Most people discard a flash-drive as too small, long before it gets old enough to run into it.

Anyhow, the larger problem is if you are going to have a paging/swapping occur why would you want it to go onto such a slow device? Any why do you think you need it? If you have enough RAM just disable the swap space.

disphenoidal
Posts: 333
Joined: Wed Apr 05, 2006 9:54 pm
Location: USA

Post by disphenoidal » Fri Jan 26, 2007 9:07 am

vincentfox wrote:The flash-write limit is over-blown in my opinion. Most people discard a flash-drive as too small, long before it gets old enough to run into it.
I think this is the case too. But that's assuming they're just using it to copy/transfer files, etc. I don't know much about how the o/s manages memory, but I imagine it writes to the swap file often.

nzimmers
Posts: 271
Joined: Mon Dec 04, 2006 6:13 pm

no swap file

Post by nzimmers » Fri Jan 26, 2007 9:27 am

that's a good suggestion, disabling the swap file all together. right now I have 1 GB of ram. not sure if that's enough but I could test it

also, I could pick up another GB of ram and then create a 1 GB ram disk for the swap file.....that would probably work pretty well actually.

I'm just going for low power consumption - I've actually run the OS off a compact flash card with an IDE adapter, and it works great on my old system but on the new one the CF to IDE adapter doesn't work (it's super cheap kind)

I suppose I could buy a new CF to IDE that's about 25$ - might be the best alternative

quielb
Posts: 32
Joined: Thu Jun 02, 2005 6:14 pm
Location: Chico, California

Post by quielb » Fri Jan 26, 2007 10:32 am

It's generally accepted that if you have 1GB+ of memory you can disable the page file. I have seen machines that were well optimized and the page file was disabled with on 512MB of ram.

vincentfox
Posts: 271
Joined: Sun Oct 09, 2005 8:35 pm
Location: CA

Post by vincentfox » Fri Jan 26, 2007 1:33 pm

disphenoidal wrote: I don't know much about how the o/s manages memory, but I imagine it writes to the swap file often.
Ordinarily, if you aren't running out of RAM, it's not swapping. Swap is supposed to be the slower backup area for handling the situations where you have exceeded real memory requirements. Then inactive processes can be swapped out to disk to run active processes. It's an expensive process. If a system swap/pages a lot you call it thrashing, because the system becomes very slow and you hear the disk grinding away. It's for most modern purposes a safety net that lets you continue working if a bit slower. I work in a Data Center. If a server is getting anywhere close to running out of RAM and hitting swap, we buy more RAM.

I have a tiny Linksys WRTSL54GS unit running OpenWRT as the OS. I plugged an old 256M thumb-drive into the USB port and declared a 32M partition of it as swap. Works okay, just gets slower once you start swapping. Been running for several months that way. It rarely gets into the state where it's putting anything on the swap-partition, I can view it with the "top" utility. No problems so far. Only reason I'm using it in this case is the router does not allow RAM upgrades.

StanF
Posts: 58
Joined: Tue Oct 10, 2006 9:39 am
Location: Texas
Contact:

Post by StanF » Fri Jan 26, 2007 3:58 pm

The worst thing you could do would be to add another 1GB of RAM and then use it as a ramdisk for the swap file. That really makes no sense. It won't use the swap file until it runs out of RAM - with 2GB, it will likely never run out of ram.

disphenoidal
Posts: 333
Joined: Wed Apr 05, 2006 9:54 pm
Location: USA

Post by disphenoidal » Sat Feb 10, 2007 1:35 pm

Apparently with larger flash devices, the write limit is indeed overblown. Here's an article about this very subject, albeit with no mention of possible energy savings.

http://www.dansdata.com/flashswap.htm

edit: forgot link... :oops:

MiKeLezZ
Posts: 110
Joined: Sun Feb 20, 2005 8:00 am
Location: ITALY
Contact:

Post by MiKeLezZ » Sat Feb 10, 2007 5:08 pm

I was thinking about it!

Imagine this:
http://www.addonics.com/products/flash_ ... adsacf.asp

With a 2GB CompactFlash 150x... 20MB/s read/write average transfer rate & 0.2ms random access time.

CF nowadays are far from slow, in fact my idea was to replace the SWAP file on my HD (that has 14ms random access time).

It is not a secret Windows Vista use these FlashMemory at its advantage (ReadyBoost).

vincentfox
Posts: 271
Joined: Sun Oct 09, 2005 8:35 pm
Location: CA

Post by vincentfox » Sun Feb 11, 2007 2:18 pm

There's already been a test done of "ReadyBoost" which found it markedly slower than simply adding enough RAM to your system.

http://www.tgdaily.com/2007/02/08/analy ... ady_boost/

There's no magic here. If you don't have enough RAM, yes you can do some funky tricks to make things work, but they will be slower. They are inferior hacks to let for example people stuck with older systems capped at 512 megs, be able to claim they can run Vista. Systems which would probably be better off just running less of a fat-pig OS than Vista. Most Flash devices do not get anything close to the throughput rates that are claimed, in sustained usage.

MiKeLezZ
Posts: 110
Joined: Sun Feb 20, 2005 8:00 am
Location: ITALY
Contact:

Post by MiKeLezZ » Sun Feb 11, 2007 5:57 pm

I can't afford 180€+ RAM for upgrading, but I could afford 50€ for CF & Adapter.

The point is different and lead us to the question:
"is this solution better/worse/equal than having a swap file on the HD?"

dhanson865
Posts: 2198
Joined: Thu Feb 10, 2005 11:20 am
Location: TN, USA

Post by dhanson865 » Sun Feb 11, 2007 7:39 pm

For those of you who can turn off Virtual Memory/Paging Files I say more power to you. However I would point out that software does exist that won't let some of us get away with it. It's poorly written software mostly but it does exist.

Games and Office applications that:

a. won't install unless VM is on
b. won't launch unless VM is on
c. allocate large amounts of VM as soon as the program opens even if the program will never need it.

scorp
Posts: 148
Joined: Fri Jun 03, 2005 3:15 am
Location: Romania

Post by scorp » Sun Feb 11, 2007 10:23 pm

If you are referring to WinXP than disabling the swap is a very bad idea; XP does not begin using the swap when it runs out of memory (read some guides such as "tweaking companion"), so disabling it will only give you tons of trouble

If you are referring to a UNIX based system (don't know what you really need from your "server", but if you don't need something that is only available in win, than I would recommend using FreeBSD or OpenBSD), the statement that it will only use swap when it runs out of memory is true, so you don't need to worry, since 1GB will most likely be enough for most of the things you do

Post Reply