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

25th July 2008, 11:46 AM
|
|
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
|

25th July 2008, 12:52 PM
|
 |
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
|

25th July 2008, 02:10 PM
|
|
Registered User
|
|
Join Date: Dec 2007
Posts: 596

|
|
create another swap partition, add it to fstab then use
to enable all of swaps
|

25th July 2008, 02:19 PM
|
 |
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
|

25th July 2008, 02:39 PM
|
|
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
|

25th July 2008, 02:51 PM
|
 |
Administrator
|
|
Join Date: Sep 2006
Location: Connellsville, PA, USA
Posts: 11,289

|
|
|
Ah, yes right - I see. OK, thanx ivancat.
V
|

25th July 2008, 02:57 PM
|
|
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.
|

25th July 2008, 03:12 PM
|
 |
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
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 22:36 (Tuesday, 21-05-2013)
|
|
 |
 |
 |
 |
|
|