FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 08-18-2010, 10:05 PM
Phil Meyer
 
Default Is swap really needed when RAM's aplenty

On 08/18/2010 05:00 AM, Sam Varshavchik wrote:
> I'll probably have a new server with 16 gigs of RAM on the way, soon.
>
> With this amount of RAM being sufficient, do I really need a swap
> partition set up? I do understand that a swap partition is needed for
> hibernation, but this server does not need to hibernate.
>

Many server types can run happily without swap.

Virtual Machine servers, and or grid servers run specialized
applications and often are installed and managed in groups of hundreds
of servers. Running them diskless allows much simpler administration of
those systems.

You just need to know if the applications you run really need swap. Now
days, with very large memory systems, they don't need swap as a general
rule.

Just how specialized servers used to not need swap, now days there are
specialized servers that must have swap. I would never run a mission
critical database server without swap, unless it was running on a grid.
See what I mean?

If you have over 4GB RAM on a desktop, you will probably never touch
your swap partition. However, if that desktop does video editing or
image rasterizing, then you might want some swap on it just to be sure
it does not crash the app in the middle of a multi-day run.

Good Luck!
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 08-18-2010, 11:53 PM
Gregory Hosler
 
Default Is swap really needed when RAM's aplenty

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/18/2010 07:00 PM, Sam Varshavchik wrote:
> I'll probably have a new server with 16 gigs of RAM on the way, soon.
>
> With this amount of RAM being sufficient, do I really need a swap partition set
> up? I do understand that a swap partition is needed for hibernation, but this
> server does not need to hibernate.

If the memory gets fragged and the kernel wants to defrag, e.g. for a memory
request from an application, in order to defrag any "dirty" data portions (those
pages that have been written to), the kernel *requires* there to be swap.
Otherwise there is no place to write the dirty pages out, in order to read them
in elsewhere.

code pages, of course, can just be conveniently "forgotten", and re-read back in
on demand. Data must be written to swap. Removing swap, removes this possibility
from the kernel. This might not be a problem for you. It depends upon your work
load and their memory footprint requirements.

- -Greg

- --
+---------------------------------------------------------------------+

Please also check the log file at "/dev/null" for additional information.
(from /var/log/Xorg.setup.log)

| Greg Hosler ghosler@redhat.com |
+---------------------------------------------------------------------+
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkxscnUACgkQ404fl/0CV/QMkACcDMezKiJL8AUMJSJBUSqxobAP
sQIAn0P2znaJ/6k95fwh9QtU3vwuoFNz
=cmmG
-----END PGP SIGNATURE-----
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 08-19-2010, 04:21 AM
Jatin K
 
Default Is swap really needed when RAM's aplenty

So the morel of the story is ( as per my understanding .... forgive me
if I miss understood. ),The regular day-to-day working desktop OS
doesn't need the swap space (especially if it is having more then or
equal 4GB RAM ) , Mission Critical Server must have swap space
even-though it is having 32GB RAM . which are running large database or
something like that

isn't it ????


Regards

--
°v°
/(_)
^ ^ Jatin Khatri
Registerd Linux user No #501175
www.counter.li.org
No M$


On Thursday 19 August 2010 05:23 AM, Gregory Hosler wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 08/18/2010 07:00 PM, Sam Varshavchik wrote:
>
>> I'll probably have a new server with 16 gigs of RAM on the way, soon.
>>
>> With this amount of RAM being sufficient, do I really need a swap partition set
>> up? I do understand that a swap partition is needed for hibernation, but this
>> server does not need to hibernate.
>>
>

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 08-19-2010, 02:22 PM
Michael Hennebry
 
Default Is swap really needed when RAM's aplenty

On Thu, 19 Aug 2010, Gregory Hosler wrote:

> If the memory gets fragged and the kernel wants to defrag, e.g. for a memory
> request from an application, in order to defrag any "dirty" data portions (those
> pages that have been written to), the kernel *requires* there to be swap.
> Otherwise there is no place to write the dirty pages out, in order to read them
> in elsewhere.

I didn't realize that memory could get fragged.
I'd thought that one reason for virtual memory
was allowing pages to be renumbered at will,
the kernel's will, of course.

--
Michael hennebry@web.cs.ndsu.NoDak.edu
"Pessimist: The glass is half empty.
Optimist: The glass is half full.
Engineer: The glass is twice as big as it needs to be."
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 08-19-2010, 02:33 PM
Patrick O'Callaghan
 
Default Is swap really needed when RAM's aplenty

On Thu, 2010-08-19 at 09:22 -0500, Michael Hennebry wrote:
> On Thu, 19 Aug 2010, Gregory Hosler wrote:
>
> > If the memory gets fragged and the kernel wants to defrag, e.g. for a memory
> > request from an application, in order to defrag any "dirty" data portions (those
> > pages that have been written to), the kernel *requires* there to be swap.
> > Otherwise there is no place to write the dirty pages out, in order to read them
> > in elsewhere.
>
> I didn't realize that memory could get fragged.
> I'd thought that one reason for virtual memory
> was allowing pages to be renumbered at will,
> the kernel's will, of course.

I thought so too, but see: http://lwn.net/Articles/211505/

poc

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 08-19-2010, 02:36 PM
"Bryn M. Reeves"
 
Default Is swap really needed when RAM's aplenty

On 08/19/2010 03:22 PM, Michael Hennebry wrote:
> On Thu, 19 Aug 2010, Gregory Hosler wrote:
>
>> If the memory gets fragged and the kernel wants to defrag, e.g. for a memory
>> request from an application, in order to defrag any "dirty" data portions (those
>> pages that have been written to), the kernel *requires* there to be swap.
>> Otherwise there is no place to write the dirty pages out, in order to read them
>> in elsewhere.
>
> I didn't realize that memory could get fragged.
> I'd thought that one reason for virtual memory
> was allowing pages to be renumbered at will,
> the kernel's will, of course.
>

Virtual memory allows us to present a simple, linear address space to
running processes even though the physical memory backing it may be
highly non-contiguous (or not even present).

Unfortunately someone still has to manage the pool of available physical
memory pages ("page frames") and it is possible for this space to become
fragmented over time as repeated allocation/deallocation cycles create
"holes" in the available memory.

The kernel implements the buddy algorithm in the page allocator to try
to minimize external fragmentation but some workloads can still lead to
a lot of pages on the low-order free lists and no larger blocks to
satisfy bigger requests.

Forcing everything out to swap and then pulling it back in is one crude
way of forcing a level of de-fragmentation. There was some discussion on
linux-mm.org of implementing novel de-fragmentation and fragmentation
avoidance techniques a while back but I'm not sure where those
initiatives are at the moment.

Regards,
Bryn.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 08-19-2010, 05:46 PM
Tim
 
Default Is swap really needed when RAM's aplenty

On Thu, 2010-08-19 at 09:22 -0500, Michael Hennebry wrote:
> I didn't realize that memory could get fragged.

An old problem, and one reason why some other OSs *needed* occasional
reboots, after a while. Even quitting all running applications, back
down to just having the basic desktop, and deliberately issuing flush
commands, wasn't enough to free up all the RAM. Particularly when
something needed a big contiguous block, because some (later than boot
time ran) system things might be sitting in the middle of the RAM.


--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 08-19-2010, 06:02 PM
JD
 
Default Is swap really needed when RAM's aplenty

On 08/19/2010 10:46 AM, Tim wrote:
> On Thu, 2010-08-19 at 09:22 -0500, Michael Hennebry wrote:
>> I didn't realize that memory could get fragged.
> An old problem, and one reason why some other OSs *needed* occasional
> reboots, after a while. Even quitting all running applications, back
> down to just having the basic desktop, and deliberately issuing flush
> commands, wasn't enough to free up all the RAM. Particularly when
> something needed a big contiguous block, because some (later than boot
> time ran) system things might be sitting in the middle of the RAM.
The FS page cache also tries to cache as much of the filesystem as
it can, in ram.
Even though this is not a real problem, because when ram is needed.
LRU pages are used, and if dirty, they are flushed first before being
re-allocated to a process.
Problem comes as Michael explains, that when a process needs a large
"physically contiguous" chunk of memory, it might not be available.
That said, usually, requests for physically contiguous memory is only
needed when wanting to map very large number of DMA pages for
doing direct physical I/O.
Otherwise, a process itself does not need to have physically contiguous
pages. Only the virtual space allocated to that "malloc" or large buffer
declaration in a program, is contiguous.

--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 08-19-2010, 09:15 PM
Michael Hennebry
 
Default Is swap really needed when RAM's aplenty

On Thu, 19 Aug 2010, JD wrote:

> Problem comes as Michael explains, that when a process needs a large
> "physically contiguous" chunk of memory, it might not be available.
> That said, usually, requests for physically contiguous memory is only
> needed when wanting to map very large number of DMA pages for
> doing direct physical I/O.
> Otherwise, a process itself does not need to have physically contiguous
> pages. Only the virtual space allocated to that "malloc" or large buffer
> declaration in a program, is contiguous.

Why would malloc or a large buffer declaration
require physically contiguous memory?

--
Michael hennebry@web.cs.ndsu.NoDak.edu
"Pessimist: The glass is half empty.
Optimist: The glass is half full.
Engineer: The glass is twice as big as it needs to be."
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 08-19-2010, 09:20 PM
Michael Hennebry
 
Default Is swap really needed when RAM's aplenty

On Thu, 19 Aug 2010, Patrick O'Callaghan wrote:

> On Thu, 2010-08-19 at 09:22 -0500, Michael Hennebry wrote:
>> On Thu, 19 Aug 2010, Gregory Hosler wrote:
>>
>>> If the memory gets fragged and the kernel wants to defrag, e.g. for a memory
>>> request from an application, in order to defrag any "dirty" data portions (those
>>> pages that have been written to), the kernel *requires* there to be swap.
>>> Otherwise there is no place to write the dirty pages out, in order to read them
>>> in elsewhere.
>>
>> I didn't realize that memory could get fragged.
>> I'd thought that one reason for virtual memory
>> was allowing pages to be renumbered at will,
>> the kernel's will, of course.
>
> I thought so too, but see: http://lwn.net/Articles/211505/

Posted November 28, 2006 by corbet:
> If a large ("high order") block of memory is not available when needed,
> something will fail and yet another user will start to consider switching to BSD.

BSD does it differently?

--
Michael hennebry@web.cs.ndsu.NoDak.edu
"Pessimist: The glass is half empty.
Optimist: The glass is half full.
Engineer: The glass is twice as big as it needs to be."
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 

Thread Tools




All times are GMT. The time now is 07:48 AM.

VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org