Linux - SoftwareThis 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.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
i know its a good thing that my swap is not being used...i have 1GB DDR ram...but i was curious why the swap space is being left untouched when the free ram drops down to even 10MB....im sure my swap space is active...
So I've actually dipped into swap, which almost never happens, but looking at the buffers/cache line shows I'm using more non-buffer memory, with less total RAM, and I've still only just gotten to swap. Plus, that fluctuates. You may have a surge that pushes you to swap and, after it drops, you might still have some swap used. So, in sum, I don't see a problem there. There'd be a problem only if swap said 0 0 0.
As far as purging, seems like there should be, but I can't think of it. sync brings the filesystem data up to date, but I dunno about RAM. But, no, in general, it shouldn't be necessary. Maybe somebody will post up with that.
Originally posted by ganja_guru i know its a good thing that my swap is not being used...i have 1GB DDR ram...but i was curious why the swap space is being left untouched when the free ram drops down to even 10MB....im sure my swap space is active...
Distribution: #1 PCLinuxOS -- for laughs -> Ubuntu, Suse, Mepis
unless you have a lot of processes and services using all the memory there is NO reason why it will get used.
with 1G ram it's likely you don't don't have a reason to use swap.
I remember days when 1G would be the total "disk capacity" on a whole bunch of machines with 10's of users :-))
Well, there's no problem. His swap is initialized and he's not maxed on physical memory, so it simply won't get used because it doesn't need to. But if it was needed, I'm sure it would be used. Like I say, it'd only be a concern if swap read zeros all the way across or he *was* maxed out on physical RAM and still wasn't swapping.
100% memory use -is- a good thing. (Because 75% of that is usually just buffers/cache)
Using swap slows things down roughly 1000% (yes, that's 4 zeros).
There are 4 types of memory: User, Shared, Buffers, and Cache. Buffers and Cache can be considered 'free' memory, they exist only until a 'real' application needs some memory that they occupy, then Linux just re-assigns that memory to that application. These buffers and cache improve the performance of your system, because reading data from physical memory is anywhere from 100-1000 times faster than reading it from disk (swap). Linux stores data in these buffers and cache that it may need again later. (Buffers and cache never hurt you. Having alot of User and Shared memory is what you need to worry about.)
But, you have to realize that there is no benefit from storing these in swap, because the data in these buffers and cache is stored on the disk somewhere already.
1. open firefox
2. close firefox
3. open Open office
4. open xmms
5. blah blah
6 open firefox again(now its slower than the previous time...i.e more that the ususal 1-2 seconds )
That is exactly how it should be. Like I said earlier, Linux dumps the buffers and cache when other programs need that memory. So if you -try- to use up all your memory, Linux will dump the cached copies of firefox. What you need to understand is that even if Linux put that cache in swap, it would be no faster than loading firefox directly from disk. Either way it loads off of the disk. There's no point in having two copies of the same thing on disk.
my biggest problems occur when i copy huge files from vfat to reiserfs/4...thats slows everything to a crawl and maxes out ram usage...but swap is never used even then..
Swap is generally only used when you try to use more memory than you actually have. When you copy large files, Linux does caching to improve the performance of the copy. (It's faster to read large blocks of data from disk at once, store those blocks in memory temporarily then write them to disk). The more memory you have, the more that can cached into memory to speed things up. Linux knows this, and it uses up all available memory, but no more, to make things faster. Your system is slowed to a crawl because it takes alot of processing power to handle a large file like that, especially if you have standard IDE drives that require the processor to handle alot of the work of copying files.
Swap doesn't get used because that would defeat the purpose. swap is -stored on the disk-. If you are reading from a disk, storing cache from that read on that disk will slow things down, not speed them up. So Linux just doesn't do it.
Also, keep this in mind. If you really maxed out your RAM, and swap really -wasn't- working, whatever program you have that's using all that memory, would get an "Out of memory" error and be killed by the kernel.
Let Linux do it's job and handle the memory for you. It does an excellent job. And no, the RAM purgers are pointless. They are pointless on Windows too. Most of them are gimmicks to get spyware/adware on your system.
Not really. New buffers push old buffers out of memory. So when you copy large files, the new buffer created by the copy command pushes the old cached copied of things like firefox out of memory.
So, it's not really a speed issue. After copying a large file, your programs will start no more slowly than they would if you had just rebooted the computer (Which would clear out the cache). For me, after I do memory intensive tasks (Which kill my cache), my system is just slightly sluggish for a few minutes. But after using all my regular apps for a few minutes, the cache gets built back up and I'm back to multi-tasking like a son of a gun.
As far as a workaround.... Not really. I mean, there may be a way to configure the your copy file utility (Which utility are you using, btw? Just the standard 'cp'?) to only use so much memory for buffering. If not, you could write up a quick file copy utility in C and make it use whatever amount of memory you want. But, it won't be as fast. Think about this:
If you make it so less data is buffered, you make the whole file transfer take longer. And while the transfer is taking place, your machine is probably -really- slow.
Would you rather have your system tied up copying files for a longer amount of time, or would you rather have it get the file transfer done, and be slightly sluggish for 2 or 3 minutes afterward?
P.S. What exactly is the nature of these large file transfers? Are you copying data between two different disks in the same system? Or are you copying data between two partitions on the same disk? Or are you copying data across a network? What kind of drives are you using (SCSI, IDE, SATA. Any RAID?)
either drag/drop with kde or just the cp command..anyway my systems behaviour is exactly the same as yours so i guess theres no need to worry..usually my copying is dont across diff filesystems...sometimes across diff disks and filesystems...thanks for all the help..!