Swap - forcing Swap

René L. Reingard list.account at gmx.net
Thu Sep 29 21:32:29 UTC 2005


> Am 29.09.2005, 23:21 Uhr, schrieb James Gray <james at grayonline.id.au>:

>> On Fri, 30 Sep 2005 06:53, René L. Reingard wrote:
>> how the usage of the Swap can be forced - as the RAM is anyway allways
>> used by around 80%.

> Hi René,
> snip <
> While Linux is running it puts frequently used files and libraries into
> "cache" memory.  From here they can be quickly retrieved - *much* faster
> than going back to the disk.  Similarly Linux will buffer disk reads and
> writes until certain thresholds are met, then commit them to disk when
> there is less activity.  This, again, dramatically improves overall
> performance.
>
> So, you've got all this RAM in your system, and Linux is trying use it as
> efficiently as possible to give you the optimum performance, but you'd
> prefer to have it flogging away at the hard drive? ;)  Didn't think so.
>
> The thing to remember is that as applications require more RAM, Linux  
> will either sacrifice buffers and/or cache, which may mean paging stuff  
> out to
> the swap space.  It could also mean simply flushing some buffer space.   
> It all depends on what is in RAM, what you're doing with your system the  
> the
> mix of RAM and swap space you have.
>
> Memory management isn't something most users should really be too  
> concerned about.  If you're running out of swap and the system runs like  
> a dog,
> *then* you may need to add more RAM  Beyond that, don't sweat it; a  
> default Linux kernel is doing a better job than you will of managing  
> your RAM +
> swap :)

this answer is a charm, James, thanks a lot!






More information about the ubuntu-users mailing list