Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 25th July 2008, 11:46 AM
karthik2fun Offline
Registered User
 
Join Date: Jul 2008
Posts: 7
how to increase the swap size

Hi,

I would like to increase the swap size on my system. I am using fedora core 8 and i have 512 mb swap . I would like to increase that to 2 gb. Kindly help me.
__________________
Regards,

Karthik.S
Reply With Quote
  #2  
Old 25th July 2008, 12:52 PM
ppesci's Avatar
ppesci Offline
Registered User
 
Join Date: May 2006
Location: Caracas, Venezuela
Posts: 1,828
If you want to increase the swap size without repartition the drive, you can use mkswap command. You can use an space locate in a file as a swap space. See the command with:

man mkswap

for details.

HTH
__________________
Pietro Pesci Feltri

PowerBook 15" G4 and
MacBook Pro 17" Intel Core 2 Duo
Intel I5 Desktop
Reply With Quote
  #3  
Old 25th July 2008, 02:10 PM
ivancat Offline
Registered User
 
Join Date: Dec 2007
Posts: 596
create another swap partition, add it to fstab then use
Code:
su -
swapon -a
to enable all of swaps
__________________
Ivan Cat (registered linux user #471784)
Linux Projects: constat | nconv
Fedora-related: Message In the Bottle
Reply With Quote
  #4  
Old 25th July 2008, 02:19 PM
Hlingler's Avatar
Hlingler Offline
Administrator
 
Join Date: Sep 2006
Location: Connellsville, PA, USA
Posts: 11,289
Hello:

That whole 'mkswap' and 'swapon' feature is very nice, and very easy to use.

One question, which the manual pages don't answer: I can't "create" another partition, so I just went through the steps to create a swap file to use instead. Everything went fine, except I got one warning: "permissions unsafe - 0666 recommend 0600". I saw that normal swap is: 0660, so that's what I made the swapfile. Also changed: chown root:disk just like normal swap. Is all that OK? Any special reason it should be: 0600?

Thanx,
V
Reply With Quote
  #5  
Old 25th July 2008, 02:39 PM
ivancat Offline
Registered User
 
Join Date: Dec 2007
Posts: 596
well, as the owner is root there is not much difference between 0600 and 0660 as root's group members are root itself and system commands/services like halt, shutdown, sync. but for increased security 0600 may be used granting read/write permissions to root exclusively
__________________
Ivan Cat (registered linux user #471784)
Linux Projects: constat | nconv
Fedora-related: Message In the Bottle
Reply With Quote
  #6  
Old 25th July 2008, 02:51 PM
Hlingler's Avatar
Hlingler Offline
Administrator
 
Join Date: Sep 2006
Location: Connellsville, PA, USA
Posts: 11,289
Ah, yes right - I see. OK, thanx ivancat.

V
Reply With Quote
  #7  
Old 25th July 2008, 02:57 PM
bee Offline
Banned
 
Join Date: Jun 2008
Posts: 1,315
i don't think that swap on a file is a good idea, it's like in windows.
As ext3, not always rewrite on the same space, maybe it'll increase the fragmentation of files and slow down the partition within that swap file is located.
???

anyhow not sure if it's real.
Reply With Quote
  #8  
Old 25th July 2008, 03:12 PM
Hlingler's Avatar
Hlingler Offline
Administrator
 
Join Date: Sep 2006
Location: Connellsville, PA, USA
Posts: 11,289
Hm, well, I don't pretend to know much about this at all, but the mkswap man page made one thing fairly clear:
Quote:
To setup a swap file, it is necessary to create that file before initializing it with mkswap , e.g. using a command like

# dd if=/dev/zero of=swapfile bs=1024 count=65536

Note that a swap file must not contain any holes (so, using cp(1) to create the file is not acceptable).
At the very least, it gives a very pleasant illusion of increased swap space.

V
Reply With Quote
Reply

Tags
increase, size, swap

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Increase RFS size kirubakonig Hardware & Laptops 1 23rd February 2009 06:28 AM
How to increase swap? Anniedog Using Fedora 5 26th June 2007 11:45 AM
How 2 increase swap space after install done austinwilde Using Fedora 1 26th August 2005 11:27 PM
Increase size of /dev/hda1 lothario Using Fedora 3 25th May 2005 02:15 PM


Current GMT-time: 22:36 (Tuesday, 21-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat