LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-02-2009, 09:04 AM   #1
PlatinumX
Member
 
Registered: May 2008
Location: France
Distribution: Debian / Fedora / Gentoo
Posts: 178

Rep: Reputation: 15
Question Consequences of no swap


Hi all,

I am running a small embedded system with a small HDD capacity.
However, RAM is 512 MB, which seems a lot compared to the applications running on it.

I am wondering of removing swap parition or file, to have more free space on the tiny HDD.

Did somebody try running without swap already ?
What happens if there is not enough physical RAM space ?


Thanks
 
Old 02-02-2009, 09:19 AM   #2
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
Generally the results of not having enough memory are things gridding to a near halt or even crashing. But it takes alot to really cause that effect. I believe if their is no swap, some distributions may use a section of / as swap (similarily to windows and virtual memory out of C:) but not certain of that. Generally it'd be wise to have 1GB of dedicated swap on that system. When you are talking a small capacity HDD, how small and what's it running?
 
Old 02-02-2009, 09:27 AM   #3
metrofox
Member
 
Registered: Jan 2009
Location: Palermo, Italy
Distribution: Slackware
Posts: 236

Rep: Reputation: 37
Quote:
Did somebody try running without swap already ?
I tried once and nothing happened, but my RAM is 1 Gb.

Quote:
What happens if there is not enough physical RAM space ?
Your PC will crash or will get slow.

In the end...How large is your swap? 1 Gb, 512 Mb? What do you recover with one 1 gb. or 512 Mb...You may have complications...

Last edited by metrofox; 02-02-2009 at 12:02 PM.
 
Old 02-02-2009, 09:32 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
I assume that the behavior when running out of memory will be very different depending on what SW you are running. There are typically a number of calls to allocate memory, and then a decision as to what to do if the request is not successful.

I can't think of any way to definitively answer your question except by running tests.

I've never heard of a distro "using /" for swap space but, regardless, this would still use disk space.
 
Old 02-02-2009, 09:34 AM   #5
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
I could have been wrong about / . I dunno that much about the indepths of linux, however on such a low speced system, if it's important I wouldn't be able to sleep at night if it didn't have a proper defined swap.
 
Old 02-02-2009, 09:37 AM   #6
metrofox
Member
 
Registered: Jan 2009
Location: Palermo, Italy
Distribution: Slackware
Posts: 236

Rep: Reputation: 37
Any way...I do not need of a swap...My swap uses the 1% of its resources...

To PlatinumX: How many resources your swap uses?(I think higher than mine)...
 
Old 02-02-2009, 09:49 AM   #7
PlatinumX
Member
 
Registered: May 2008
Location: France
Distribution: Debian / Fedora / Gentoo
Posts: 178

Original Poster
Rep: Reputation: 15
Quote:
To PlatinumX: How many resources your swap uses?(I think higher than mine)...
I don't have a the precise answer here.
I will check this.

Thanks for info guys
 
Old 02-02-2009, 11:37 AM   #8
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
Just use the top command in bash or a ssh shell and it will tell you. It's q to quit for top.
 
Old 02-02-2009, 12:02 PM   #9
metrofox
Member
 
Registered: Jan 2009
Location: Palermo, Italy
Distribution: Slackware
Posts: 236

Rep: Reputation: 37
Code:
Swap:  2096440k total,        0k used,  2096440k free,   420832k cached
That's what my swap says...As you can see my swap doesn't consume resources, 0k used...I don't know why I gave 2 Gb to swap when it needs 1Gb at max.(next installation I'll remove it )...Maybe I had in my head that swap had to be double than RAM, but that technical worked for 2.4.x kernels...
 
  


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
LXer: GPLv3 - Unforseen Consequences? LXer Syndicated Linux News 1 06-07-2007 12:38 AM
File System Corruption - Causes and Consequences? Ingla Linux - General 3 10-10-2006 12:59 PM
What are the consequences of uninstalling yum? dr_zayus69 Linux - Software 6 02-02-2006 06:55 AM
root ftp consequences DigitalSmash Linux - Security 5 12-15-2004 04:24 AM
Deleting GNOME.. the consequences Stephanie Linux - General 3 01-28-2002 02:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:22 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration