Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to increase swap partition?

2 views
Skip to first unread message

Stacy Waldrip

unread,
Jan 20, 2004, 8:52:13 PM1/20/04
to
I have 1 Gig ram and a 1 Gig swap partition in the center of my hard drive
and only 1 other partition at 59 Gigs running SuSE 9.0 Pro. I have been
trying to edit some LARGE photos and Gimp is running out of memory. I would
like to increase my swap partition from 1 Gigabyte to 5.
I started to do it in the Control Center and after reading all the scary
messages I have some questions.
1. Do I also have to umount the main partition that my swap partition will
be stealing from?

2. Can I unmount both and redistribute the sizes within the GUI?

3. Would using the terminal be better? and how would I word the commands so
as not to FUBAR my system?

4. Could the SuSE 9.0 Pro Installation CD 1 be booted and redistribute
partitions that way without doing a clean install?

5. Will the new 5 Gig swap partition be in the center of the hard drive
disk?

Please help,

Thanx

Stacy

X-Ray

unread,
Jan 20, 2004, 9:51:21 PM1/20/04
to

Well, It sounds like you wanna have a reassurance that you wont loose data
while trying to resize your partitions without having a backup.
Nobody will give you this.

My advice: Go to ebay and buy a 3 or more GB disk for some pennies,
put it into your computer and fdisk it as another swap then add the new
swap space with another entry in your fstab.
Having two swap partitions on two independent harddrives will almost certaintly
give you a much better performance while swapping. Especially if you have
SCSI or the disks are on differend IDE channels.

--
Frank Schruefer

Stacy Waldrip

unread,
Jan 20, 2004, 9:59:06 PM1/20/04
to
X-Ray wrote:
>
> Well, It sounds like you wanna have a reassurance that you wont loose data
> while trying to resize your partitions without having a backup.
> Nobody will give you this.
>
Actually it is a new laptop with little worth saving but it was a REAL pain
compiling my modem driver...took 2 days! done it by trial and error and
finished compiling it by accident. I would have to rediscover how I did it
all over again.

> My advice: Go to ebay and buy a 3 or more GB disk for some pennies,
> put it into your computer and fdisk it as another swap then add the new
> swap space with another entry in your fstab.

That is certainly good advice as I have done this for my desktop. BUT for my
laptop I would need external HDs by USB and this just starts to increase
the complexity.

Thanx though,

Stacy

Menno Duursma

unread,
Jan 21, 2004, 6:59:21 AM1/21/04
to
On Tue, 20 Jan 2004 21:59:06 -0500, Stacy Waldrip wrote:
> X-Ray wrote:
>>
>> My advice: Go to ebay and buy a 3 or more GB disk for some pennies,
>> put it into your computer and fdisk it as another swap then add the new
>> swap space with another entry in your fstab.
>
> That is certainly good advice as I have done this for my desktop. BUT for my
> laptop I would need external HDs by USB and this just starts to increase
> the complexity.

Why not use a swap _file_ instead?
Something like:

dd if=/dev/zero of=/swapfile bs=1024 count=`echo $[1024*1024*4]'
chmod 0600 /swapfile
mkswap /swapfile
echo "/swapfile swap swap defaults 0 0" >>/etc/fstab
swapon -a

Then have a look with "swapon -s" to see if it worked.

HTH.

--
-Menno.

Menno Duursma

unread,
Jan 21, 2004, 7:36:21 AM1/21/04
to
On Wed, 21 Jan 2004 11:59:21 +0000, Menno Duursma wrote:

> Something like:
>
> dd if=/dev/zero of=/swapfile bs=1024 count=`echo $[1024*1024*4]'

Oops. Make that:

dd if=/dev/zero of=/swapfile bs=1024 count=$[1024*1024*4]

Sorry 'bout that.

--
-Menno.

Brian

unread,
Jan 21, 2004, 8:36:55 AM1/21/04
to
On Tue, 20 Jan 2004 20:52:13 -0500, Stacy Waldrip wrote:

> I have 1 Gig ram and a 1 Gig swap partition in the center of my hard drive
> and only 1 other partition at 59 Gigs running SuSE 9.0 Pro. I have been
> trying to edit some LARGE photos and Gimp is running out of memory. I would
> like to increase my swap partition from 1 Gigabyte to 5.
>

As I understand it, your partition size is fine wrt to the RAM on your
system.
Have you checked the settings in Gimp? File|Preferences Environment for
memory-related settings, or Directories for disk-related settings.
It uses its own temporary and swap directories, which on my setup are
located in my home directory and /tmp respectively.

Out of interest, what sort of size is the large photo you're trying to
use? I've managed with 30-40MB images Ok.

B.
--
Bus Error (passengers dumped)

Paul Sherwin

unread,
Jan 21, 2004, 11:24:15 AM1/21/04
to
On Wed, 21 Jan 2004 11:59:21 GMT, Menno Duursma <me...@desktop.lan>
wrote:

>Why not use a swap _file_ instead?

I agree, using a swapfile rather than a partition is a very painless
way to get more swap space. There's a bit of file system overhead but
you probably won't notice it. However, 1 gig is a very big swap
partition already for a single user system, even if you do lots of
graphical work. If you really are swapping 1Gb of stuff in and out of
physical memory, your system will run like a dog.

Best regards, Paul
--
Paul Sherwin Consulting http://paulsherwin.co.uk

MikeyD

unread,
Jan 21, 2004, 2:08:34 PM1/21/04
to
> I have 1 Gig ram and a 1 Gig swap partition in the center of my hard drive
> and only 1 other partition at 59 Gigs running SuSE 9.0 Pro. I have been
> trying to edit some LARGE photos and Gimp is running out of memory. I
> would like to increase my swap partition from 1 Gigabyte to 5.
> I started to do it in the Control Center and after reading all the scary
> messages I have some questions.
> 1. Do I also have to umount the main partition that my swap partition
> will be stealing from?
>
If you want to resize it, then yes, I expect.

> 2. Can I unmount both and redistribute the sizes within the GUI?

Possibly. Depends exactly how the gui works.


>
> 3. Would using the terminal be better? and how would I word the commands
> so as not to FUBAR my system?
>
> 4. Could the SuSE 9.0 Pro Installation CD 1 be booted and redistribute
> partitions that way without doing a clean install?

Might do, I don't know about SUSE, but the slackware boot cd could.


>
> 5. Will the new 5 Gig swap partition be in the center of the hard drive
> disk?

Probably depends how you configure it.

My advice: Ignore the gui, get a bootdisk version of GNU Parted, boot from
floppy with that and use that to resize your partitions. Just read the
manual and you should be fine with parted, I was anyway. Use parted to
shrink the main partition, then delete your existing swap partition and
replace it with a bigger one. (IIRC you do all that from parted, however
you might need to use fdisk. Again, bootdisk.)

Stacy Walrip

unread,
Jan 21, 2004, 11:07:39 PM1/21/04
to
Brian wrote:

> Out of interest, what sort of size is the large photo you're trying to
> use? I've managed with 30-40MB images Ok.
>
> B.

Just trying to scan color @ 2400
Gimp is using the xsane interface and when I put in the selections for
color,flatbed,2400 dpi the message on the bottom window says:
14328*27983*24 (1147.1MG)
I know this seems like alot but I just reinstalled SuSE 9.0 Pro with a 9.1
GB Swap partition and I have 1 GB of Ram. Even after this I still get the
error message for the EPSON Perfection 2400 Photo saying: Failed to start
scanner: Out of memory

Stacy

Bill Marcum

unread,
Jan 22, 2004, 3:34:55 PM1/22/04
to
I didn't know you could write arithmetic expressions that way, so I
looked it up:

Arithmetic expansion allows the evaluation of an arithmetic expression and
the substitution of the result. The format for arithmetic expansion is:

$((expression))

The old format $[expression] is deprecated and will be removed in
upcoming
versions of bash.

--
Absurd Procrustean Egghead Cornstarch Variant Bill Marcum

0 new messages