LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   how to use swap more than the physical memory (https://www.linuxquestions.org/questions/linux-general-1/how-to-use-swap-more-than-the-physical-memory-161221/)

Santosh_d 03-22-2004 11:54 PM

how to use swap more than the physical memory
 
hi all,
my problem is that i want to use more of the swap space instead of the physical memory...the normal operation is -- first the system uses the physical memory and once all memory is consumed, the swap space is used....i want to somehow change this default behaviour and use the swap more.
is this possible?? and how??

thanx
Regards

tiger7007 03-23-2004 12:01 AM

linux isnt like windows where u can config the swap memory and it will uses the window$ c: d: partion's linux creates a swap partion for better access insted the way it works is that when u install linux ,linux creates swap partion that doubles ur memory for example i have 256 physical memory so my swap partion is 500mb so for what i know so far ull have to create the partion's all over agian to make the swap partion bigger unless u have unused space on the hard drive wich in this case u can use parted or fdisk to recreate the swap partion. goodluck :cool:

arrruken 03-23-2004 12:04 AM

You wouldnt want the system using more swap than memory, the reason:
most hard drives transfer around 30-40 mbp/s, vs. ddr 2700 memory transfering at 2.7 gbp/s.

Santosh_d 03-23-2004 12:20 AM

the thing is...i want to make some applications(postfix) use swap instead of physical memory so that this memory can be utilised by other applications that really need fast memory...thats all..is this possible??

thanx

J.W. 03-23-2004 12:55 AM

Dude - unless you're trying to reduce your system performance to be as slow as possible, you will want to let your RAM handle as much work as possible, and only use the swap as a last resort. As arrruken states, data transfer rates on a hard drive are measured in Megs per second, but in RAM they are measured in Gigs per second. With all due respect, trying to set up your system to use swap as the default memory source simply isn't a good idea.

Keep in mind that swap only comes into play when physical memory is exhausted, and the system needs to swap out the least used pages. Unless your system is operating at maximum capacity at all times, you would want RAM to do the work, not force swap to do it as the default. -- J.W.

Brane Ded 03-23-2004 01:02 AM

If you're getting freaked out because of a memory monitor, don't sweat it. A large portion of your used memory is just cached stuff that's freed up when other programs need it. You shouldn't worry about swap unless you actually see your swap space being used regularly, and in large amounts.

Santosh_d 03-23-2004 01:57 AM

ok
thnax a lot!!!
Regards

comprookie2000 03-23-2004 04:56 AM

Thanks Brane Ded,I did not understand,but you made it simple for me to understand,I had rebooted after a few day because I thought<dangerous>something was wrong because I was using so much memery,but swap has never been used,if you could explain a little more would be great,thanks david

mjolnir 03-23-2004 05:09 AM

Here is a nice link on linux memory:
http://www.xenotime.net/linux/doc/swap-mini-howto.txt

Crazy Travis 03-24-2004 02:51 PM

linux doesn't allocate memory like windows. if you see memory not acting like windows most of the time you don't have to worry about it.


All times are GMT -5. The time now is 11:15 PM.