LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 09-15-2003, 03:49 AM   #1
sureshsaragadam
LQ Newbie
 
Registered: Sep 2003
Location: Visakhapatnam
Distribution: Red Hat Linux 9
Posts: 24

Rep: Reputation: 15
Question How to increase SWAP partition space ?


Hi,

I upgraded my RAM from 128 MB to 256 MB on intel 810 chipset,
i added one more 128 MB RAM,

My system is running on LILO boot loader, for both red hat linux and windows 98.

Even though both Linux and Windows detected 256 MB RAM,
Linux performance went wery bad, even it is taking more time to boot linux !

What may be the problem?
It is must to increase the swap sapce if RAM is upgraded? if not needed why the system perfirmance went down?
How can i increse swap partition?
Do i have to configure any .. if I upgrade RAM for linux, because it is not the case with windows

Thanking you

suresh saragadam
 
Old 09-15-2003, 05:04 AM   #2
Neo_the_one
LQ Newbie
 
Registered: Aug 2003
Location: Chennai
Distribution: RH 8
Posts: 8

Rep: Reputation: 0
do the following

# dd if=/dev/zero of=suresh bs=128M count=1

after this

# mkswap suresh
# swapon suresh

bs=< anysize as u wish in the first command>
 
Old 09-15-2003, 05:25 AM   #3
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix, 98,2000 + various
Posts: 3,171

Rep: Reputation: 51
it's not the swap space. it's something else.
 
Old 09-15-2003, 05:25 AM   #4
sureshsaragadam
LQ Newbie
 
Registered: Sep 2003
Location: Visakhapatnam
Distribution: Red Hat Linux 9
Posts: 24

Original Poster
Rep: Reputation: 15
hi neo,

does this dd command used for increasing the swap partition or swap file.

I think there are two ways to make use of swap one by creation swap partition and other with out creation swap partition

suresh saragadam
 
Old 09-15-2003, 05:37 AM   #5
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix, 98,2000 + various
Posts: 3,171

Rep: Reputation: 51
that dd command was for making a swap file.
 
Old 09-15-2003, 05:49 AM   #6
sureshsaragadam
LQ Newbie
 
Registered: Sep 2003
Location: Visakhapatnam
Distribution: Red Hat Linux 9
Posts: 24

Original Poster
Rep: Reputation: 15
____________________________________
that dd command was for making a swap file.

So how do i extend a swap partition, The quesiton remains the same, Can you let me know why my PC performance went down even after detecting upgraded RAM. Of course swap partition is not extended. do i have to make any conf changes?

and one more doubt here guru

How does it differ Creating a Swap Partion and Swap file,
 
Old 09-15-2003, 07:30 AM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,857

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Did you install the same type of RAM? If that is all you did to the PC you could try removing the RAM and see if the performance improves.

A swap partition is faster then a swap file. How big is your swap partition now? The free command will show how much swap space is being used. If your not using much then increasing it will not improve performance.

linux can use multiple swap partitions. The easiest method would be to create another partition. Use mkswap to format and add a line to the fstab. If you have your entire drive partitioned it would be a task to resize existing partitions just to resize your swap.
 
Old 09-15-2003, 09:36 AM   #8
sureshsaragadam
LQ Newbie
 
Registered: Sep 2003
Location: Visakhapatnam
Distribution: Red Hat Linux 9
Posts: 24

Original Poster
Rep: Reputation: 15
Yes, May be the problem is that i have not upgraded with the same RAM

i had two 128 MB RAMS of different make,
that is good idea i will make an other partition for the upgraded ram, my drive is in complete use , then i need to resize existing partition ,

the two RAMS are from diff make,
in this case single swap partiton is possible or not?

because i tried

free -m

showing 250 MB swap space for both 128 MB RAM's
( i.e the earlier swap partiton as it is) but i found no swap space is in usage. so the performance went too bad

if single partion is not possible , can you please give me hints to resize the existing partitions.

when i am use dd command to resize existing swap this is the error message dd:memory exhausted is reflecting, what may be the error?

dd if=/dev/zero of=/swap bs=512M count=1
dd:memory exhausted

what actually dd does?

I thank all
 
Old 09-15-2003, 10:06 AM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,857

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
The dd command just copies raw binary data to a file / device. And in this case it is just coping all zeros. And since your trying to copy 512mb to 250mb parition the command runs out of space.

Resizing partitions will be much more of a task then I think you ready to tackle. Like I said if your not using any existing swap space then adding more isn't going to help. The program parted will resize existing partitions. The easiest method as described above would be to add a swap file.

The new RAM should be of the same type and speed. If there not the same speed then it should be faster. New motherboards are more sensitive to the different manfactures memory and so check with motherboard manufacture for recommendations.

Like I posted before remove the new memory and see if the speed is back.
 
Old 09-15-2003, 11:10 AM   #10
sureshsaragadam
LQ Newbie
 
Registered: Sep 2003
Location: Visakhapatnam
Distribution: Red Hat Linux 9
Posts: 24

Original Poster
Rep: Reputation: 15
Yes i I removed one of the 128 MB RAM's and found that my system is working fine, because i had 250MB swap partition,

But when i am booting with 256MB RAM system went very slow even booting is also dead slow,

Here i need to use 256 MB RAM so better i create an other partition of 250MB swap and use it for the other RAM, can you help me to do this.
 
Old 09-15-2003, 02:46 PM   #11
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix, 98,2000 + various
Posts: 3,171

Rep: Reputation: 51
i use no swap, and my system runs about the same,
no matter the amount of ram. sometimes i need some
swap for something, and i add it then. i just think
something's messed up with the ram or motherboard,
who knows, and the swap doesn't have anything to do
with it.
 
Old 09-15-2003, 05:34 PM   #12
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,857

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
whansard
Yep, I agree

If you really want to add some swap space try swap file. http://www.justlinux.com/nhf/Filesys..._Swapping.html

Try swaping the new RAM for the original RAM stick. If the computer runs slower then you might have the wrong type RAM. If it runs just as fast then since the RAM sticks are not from the manufacture then they might not play together or you might have an issue with the second RAM slolt.
 
Old 09-16-2003, 04:36 AM   #13
sureshsaragadam
LQ Newbie
 
Registered: Sep 2003
Location: Visakhapatnam
Distribution: Red Hat Linux 9
Posts: 24

Original Poster
Rep: Reputation: 15
I too dont want to use swap , linux does it
I want to make use of my full RAM,

Here problem is System is detectiong the RAM, but performance went down , if i reinstall linux i think the performance will boost up, but reinstalltion is not the solution, so better i try with swap file only best option i have!

Try swaping the new RAM for the original RAM stick.
please let me know how to do this . . ?

=> If the computer runs slower then you might have the wrong type RAM.

May be they are from didffernt make, they are doing good individually, may be in this case two swap partitions will do !?
 
Old 09-16-2003, 04:50 AM   #14
sureshsaragadam
LQ Newbie
 
Registered: Sep 2003
Location: Visakhapatnam
Distribution: Red Hat Linux 9
Posts: 24

Original Poster
Rep: Reputation: 15
How to increase SWAP space ?

http://www.justlinux.com/nhf/Filesys..._Swapping.html

This reference is perfect solution to increase swap on linux

Thank you, I got some stuff from this .
 
Old 09-16-2003, 07:14 AM   #15
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,857

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
I forgot to ask how many memory slots you are using? I had assumed that you had one 128mb memory stick. So by installing the new RAM in the slot where the old RAM is located this will verify wether the new RAM affects the speed of the PC.

If it runs as fast as you think it should then place the old RAM in the second slot. If not then verify the new RAM is the correct speed as the old. If the system runs slower with the new RAM in the 1st slot and the old in the 2nd then you might have a compatablity problem between the two.

I had read were some motherboards with three slots did not work with RAM in the third slot.

Look at the output of the console command free. If it shows zero or close to zero for swap usage during your normal computing activities then adding additional swap space will not improve performance.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
deleting/resizing swap partition / increasing hd space saranga2000 Linux - Hardware 1 12-09-2004 10:03 AM
I want to increase my Linux partition.Should I take space from a Windows partition? PrinceBalak Linux - General 1 06-25-2004 05:44 PM
Looking to increase swap partition Patgod Linux - Newbie 8 03-29-2004 05:46 PM
Swap Partition Space fiending Linux - Distributions 2 11-04-2003 10:07 PM
Increase Swap Space? star geezer Linux - Software 9 03-10-2003 12:04 PM


All times are GMT -5. The time now is 05:24 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration