Fedora Linux Support Community & Resources Center
  #1  
Old 21st February 2009, 07:02 PM
cola Offline
Registered User
 
Join Date: Sep 2007
Location: Dhaka,Bangladesh
Posts: 390
Deleting swap space

Hi,
I added swap space(64MB) using this
HTML Code:
http://fcp.surfsite.org/modules/smartfaq/faq.php?faqid=502
HTML Code:
dd if=/dev/zero of=/swapfile bs=1024 count=65536
mkswap /swapfile
swapon /swapfile
/swapfile    swap    swap   defaults 0 0
Now how can I remove this swap space?
I deleted the /swapfile.

cat /proc/swaps
HTML Code:
Filename				Type		Size	Used	Priority
/dev/sda7                               partition	1333352	435268	-1
/swapfile\040(deleted)                  file		65528	0	-2
/tmp/swap_file                          file		1048568	0	-3
free -m
HTML Code:
             total       used       free     shared    buffers     cached
Mem:          1000        442        558          0          4        160
-/+ buffers/cache:        276        723
Swap:         2390        425       1965
__________________
fedora
Reply With Quote
  #2  
Old 21st February 2009, 07:09 PM
bee Offline
Banned
 
Join Date: Jun 2008
Posts: 1,315
Code:
swapoff /swapfile <---at first!!!!!!!!!!!
rm /swapfile <---to remove the file
edit /etc/fstab <---- remove that swap from there if you've added it
bye!!!!!!!!
Reply With Quote
  #3  
Old 21st February 2009, 07:14 PM
cola Offline
Registered User
 
Join Date: Sep 2007
Location: Dhaka,Bangladesh
Posts: 390
Quote:
Originally Posted by bee View Post
Code:
swapoff /swapfile <---at first!!!!!!!!!!!
rm /swapfile <---to remove the file
edit /etc/fstab <---- remove that swap from there if you've added it
bye!!!!!!!!
The problem is I already deleted the file /swapfile before swapoff /swapfile.

swapoff /swapfile
HTML Code:
swapoff: /swapfile: No such file or directory
What should I do now?
__________________
fedora
Reply With Quote
  #4  
Old 21st February 2009, 07:23 PM
bee Offline
Banned
 
Join Date: Jun 2008
Posts: 1,315
Code:
Filename				Type		Size	Used	Priority
/dev/sda7                               partition	1333352	435268	-1
/swapfile\040(deleted)                  file		65528	0	-2
/tmp/swap_file                          file		1048568	0	-3
As there weren't bytes written ...... it won't be a problem... you were lucky!
edit /etc/fstab and remove the swap file from there (if you have added it before)......... and reboot!!

bye!!!!!!
Reply With Quote
  #5  
Old 21st February 2009, 07:36 PM
cola Offline
Registered User
 
Join Date: Sep 2007
Location: Dhaka,Bangladesh
Posts: 390
Quote:
Originally Posted by bee View Post
Code:
Filename				Type		Size	Used	Priority
/dev/sda7                               partition	1333352	435268	-1
/swapfile\040(deleted)                  file		65528	0	-2
/tmp/swap_file                          file		1048568	0	-3
As there weren't bytes written ...... it won't be a problem... you were lucky!
edit /etc/fstab and remove the swap file from there (if you have added it before)......... and reboot!!

bye!!!!!!
Thanks bee.
Does increasing swap space make the system slower?
__________________
fedora
Reply With Quote
  #6  
Old 21st February 2009, 07:43 PM
bee Offline
Banned
 
Join Date: Jun 2008
Posts: 1,315
Quote:
Originally Posted by cola View Post
Thanks bee.
Does increasing swap space make the system slower?
You're welcome!!!!!!!!

Your question is a bit too hard to understand
I don't know how you define "the system" (is this system, the system? We are in matrix jk). While there are enough available RAM, swap files/partitions aren't much used... so they won't slow down your system.

bye!!!!!!
Reply With Quote
  #7  
Old 21st February 2009, 07:55 PM
cola Offline
Registered User
 
Join Date: Sep 2007
Location: Dhaka,Bangladesh
Posts: 390
Quote:
Originally Posted by bee View Post
You're welcome!!!!!!!!

Your question is a bit too hard to understand
I don't know how you define "the system" (is this system, the system? We are in matrix jk). While there are enough available RAM, swap files/partitions aren't much used... so they won't slow down your system.

bye!!!!!!
Will the Fedora 10 be slower?
My ram size:1GB.
And increasing the swap space has no effect on windows.Am I right?

free -m
HTML Code:
             total       used       free     shared    buffers     cached
Mem:          1000        983         16          0         12        495
-/+ buffers/cache:        476        524
Swap:         2326          0       2326
df -h
HTML Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda6              22G   12G  8.9G  57% /
tmpfs                 501M   76K  501M   1% /dev/shm
/dev/sda5              28G   12G   16G  44% /media/disk
/dev/sda1              25G  8.3G   17G  34% /media/disk-1
Is there any relation between tmpfs and swaps ?
Where did it get 501M from?
What do the swap and tmpfs do?
And what does the /tmp directory do?
__________________
fedora

Last edited by cola; 21st February 2009 at 07:57 PM.
Reply With Quote
  #8  
Old 21st February 2009, 08:19 PM
bee Offline
Banned
 
Join Date: Jun 2008
Posts: 1,315
Quote:
Originally Posted by cola View Post
Will the Fedora 10 be slower?
My ram size:1GB.
And increasing the swap space has no effect on windows.Am I right?
Fedora won't be slower if you have a big or small swap space. The execution speed is based on your CPU(s) and it won't change if you boot into Windows or Linux...nor if you have plenty of swap space.
The swap is useful so applications can allocate memory even if your RAM is full. The swap partitions aren't ways to improve the speed of your PC They are useful to let your computer work even on high loads because of high memory requirements.
However, adding to your computer some real RAM, will increase the speed of your PC... if the bottleneck you have is related to a low (ram)memory and high swap-usage.
Quote:
Originally Posted by cola View Post
Is there any relation between tmpfs and swaps ?
Where did it get 501M from?
What do the swap and tmpfs do?
And what does the /tmp directory do?
I'm not even sure, but i think tmpfs is a virtual file to store temporary (tmp) files! so "501M" are just 500 mb of your memory...
The "swap file" is a way to extend your RAM. So, if some software is asking for some memory, the OS (linux) will allocate it into the swap (or into the RAM and move something else into the swap) in order to give some memory to all applications, in place of returning a NULL pointer and some software without memory
The /tmp directory, is just a directory. Nothing more and nothing else. Usually software need to save some big pieces of information and buffers, without requiring any high speed performance to reload them... so programmers just save those stuffs on normal-files... located into that directory (/tmp)

bye!!!!!!
Reply With Quote
  #9  
Old 21st February 2009, 08:23 PM
cola Offline
Registered User
 
Join Date: Sep 2007
Location: Dhaka,Bangladesh
Posts: 390
Thanks bee.
Yea,The bee labours for others.
__________________
fedora
Reply With Quote
  #10  
Old 21st February 2009, 09:13 PM
bee Offline
Banned
 
Join Date: Jun 2008
Posts: 1,315
Quote:
Originally Posted by cola View Post
Thanks bee.
Yea,The bee labours for others.
Good!!! you're welcome!!!

happy flying!!!!
bye!!!!!!!
Reply With Quote
Reply

Tags
deleting, space, 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
F9: Why does deleting files not free up disk space? rweed Using Fedora 13 3rd September 2008 09:28 PM
No free space after deleting files on ext3 Partitions elgreco Using Fedora 0 18th June 2006 10:39 AM
Swap space is not in use? longman Using Fedora 10 10th April 2006 06:08 AM
crashing swap space or swap command ? mnisay Servers & Networking 2 18th January 2006 05:01 PM
Not using swap space. Jex Using Fedora 6 23rd November 2004 12:25 AM


Current GMT-time: 20:07 (Saturday, 20-12-2014)

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
...InterContinental Boston Photos on Instagram - Cathedral of Barcelona Travel Photos - Changi Terminal 2 Departure Gates Instagram Photos