USB swap -- low ram solution

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
User avatar
mysticmarks
Posts: 159
Joined: Tue 27 Feb 2007, 01:56
Location: California
Contact:

USB swap -- low ram solution

#1 Post by mysticmarks »

Im a 99% USB user. Heres my best solution to share.
i only suggest this to users with at least a 512MB USB drive(although it will work for a 256MB if you half the numbers)

What you need:>
1 usb drive (512MB or more)
one bootable puppy CD, or a linux OS otherwise
a partion tool, in this case Gparted
some basic understanding of partitioning

What are you doing?
You are creating a small linux swap partition on your usb drive.

Why are you doing it?
To pick up laggy performance, and avoid having to do the same thing on your hardrive.

Warning: This does cause the usb drive to be used for writes as needed, this does mean that your stick will not reap ALL the benefits of puppys write rarely to extend the life of the usb. The other side of the coin is that it WILL help extend the life of your internal memory. if you feel like not using the swap all the time such as only when you want to use art programs for animation for instance, simply open mut and turn of the swap! and turn it on as needed. :) (i personally am comfortable leaving it on.)

Steps:
1. boot from your puppy bootable cd, or run your linux distro of choice containing the partition tool(gparted for this solution)

2. once you have reached the desktop, insert your usb stick

3. start Gparted from Menu-->system menu

4. You should see a default view containing the Hard drive and its partitions, Ignore it

5. at the top left of the Gparted screen click Gparted then devices from the sub menu and now look for a entry which looks size wise to be your usb drive and select it.(most of the time it will be a sda, sdb, or something close to that)

6. you should now see a bar graph and below that a table containing the existing partition. It will be a FAT16 or FAT32.(if it already has puppy installed and other files that is fine! If not thats is ok too.)

7. select the partition from the list and select resize from the buttons located above the visual graph. you will now see a box with 3 entry fields. Free space preceeding, new size, and free space following.
We will be editing FREE SPACE FOLLOWING only.

8. In the free space field we will enter a value of either:
32 or 64 if you are using a 256MB stick
64 or 96 if you are using a 512 MB stick.
128 or 192 if you are using a 1GIG stick or greater.
The "free space following" entry is going to be the same space/size we will use to create our new swap partition. This space will essentially become ram as needed. if you are not quite sure what number to use, 64 is a good default for now if your using a 512MB or 256MB stick, and i like 192MB for GIG and larger sticks as it makes downloading and editing files better if you dont want to reboot often.(you can always make it smaller if you ever want the space) Once you have made a decision click RESIZE.(*note*- if your fat partition is very full and you want the larger performance, you may need to delete your pupsave file and start anew. this means backup your stuff to another medium if its important!)

9.Now RIGHT CLICK the new unallocated space that we have created in the menu and select new. we are only going to be concerned with the right hand bottom drop down option called Filesystem. It is preset to ext2. We will change this to linux-swap, then click the add button.

10. Finally we will look at the visual bar graphs to verify that we will now have 2 partitions, one is the smaller fat file system, the other is the new linux swap. If they look ok, we will select edit from the top of the screen and then click APPLY.

Thats it! you have now created a new partition on your usb drive to fulfill all your ram hogging needs! Eject the puppy disk, leave the usb stick in the usb port, reboot, and see if you are happier with your newly trained puppy!

User avatar
Sit Heel Speak
Posts: 2595
Joined: Fri 31 Mar 2006, 03:22
Location: downwind

#2 Post by Sit Heel Speak »

USB flash sticks are so cheap nowadays that, even if it does burn out after only 50,000 writes, so what? I saw a 2GB stick the other day, Kingston brand, US$17.98 with a local newspaper coupon.

User avatar
mysticmarks
Posts: 159
Joined: Tue 27 Feb 2007, 01:56
Location: California
Contact:

on the money!

#3 Post by mysticmarks »

Sit Heel Speak wrote:USB flash sticks are so cheap nowadays that, even if it does burn out after only 50,000 writes, so what? I saw a 2GB stick the other day, Kingston brand, US$17.98 with a local newspaper coupon.
You stole the words out of my mouth, i just didn't want to sound like any amount of money was disposable. couldn't agree more.

puppylinuxw
Posts: 67
Joined: Mon 06 Nov 2006, 18:18

How long did u drive swap without problems?

#4 Post by puppylinuxw »

Hi mysticmarks!
Your solution - Thats exactly is what im searching for!
How long did u drive ur swap without problems?
In hours i mean.
I upgrade today from 512 MB to 1 GB USB drive cause my 512 is full and cant incrase my pupsave anymore. I will make the swap then too. 1 GB is about 5 Dollar. Has went cheap and will go cheaper - wow!

Greetings

puppylinuxw
Posts: 67
Joined: Mon 06 Nov 2006, 18:18

did u try switch on and off in running Puppy?

#5 Post by puppylinuxw »

@ Mysticmarks
Did u try to switch swap on and off in running Puppy?
If u are going in memory trubble - just switch swap on to solve the Problem. Would be fine!
But maybe late if Puppy is already nearly stop working.

Greets

User avatar
mysticmarks
Posts: 159
Joined: Tue 27 Feb 2007, 01:56
Location: California
Contact:

swap

#6 Post by mysticmarks »

still using it now. I enjoy puppy for hours every day off of my usb stick with no problems. i turn the swap off and on at a whim. the best part is that every other linux distrobution ive used picks up the extra swap as usable as well. Nice perk if you need that little boost.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#7 Post by sunburnt »

It'd be nice if a few USB flash drive manufacturers would take note of this.

A 1gB flash drive with 1gB of DRAM for a swap partition would be a great
addition for low RAM PCs, the DRAM could run at up to 1gbs USB-2 speed !!!

A much faster setup & it wouldn't wear out the flash part of the drive unit.

User avatar
mysticmarks
Posts: 159
Joined: Tue 27 Feb 2007, 01:56
Location: California
Contact:

flash

#8 Post by mysticmarks »

i like that idea too. I think its funny that they made vista do the same thing linux has done with swap paritions all along. Using the usb drive to "boost vistas performance". Boost?! that son of a gun needs a tow.

WoodenNickle

Re: flash

#9 Post by WoodenNickle »

mysticmarks wrote:i like that idea too. I think its funny that they made vista do the same thing linux has done with swap paritions all along. Using the usb drive to "boost vistas performance". Boost?! that son of a gun needs a tow.
Don't tell Billie that a M$ programmer is copying a Linux standard practice!
He'd have MANY sleepless nights.

Cheers,
WN

Post Reply