Dark Ninja
10-14-2001, 12:36 AM
Is there anyway to free the RAM being used under swap? The physical memory automatically is freed but it doesn't seem to happen to the swap file. Is there any way to do this?
Dark Ninja
Dark Ninja
|
Click to See Complete Forum and Search --> : Freeing the Swap Dark Ninja 10-14-2001, 12:36 AM Is there anyway to free the RAM being used under swap? The physical memory automatically is freed but it doesn't seem to happen to the swap file. Is there any way to do this? Dark Ninja posterboy 10-14-2001, 07:01 AM Hmm, that confused me. There isn't any ram being used under swap, is there? That's a disk file. It comes and goes into the ram, but the disk file itself uses only disk resources, right? I wonder why you would want to do that, what am I missing? bdg1983 10-14-2001, 07:06 AM I was wondering the same. The only way I know to do so would be to reboot or maybe swapoff and then swapon though turning off swap may crash your system if the swap is being utilized. man swapon man swapoff Actually those man pages are both the same. posterboy 10-14-2001, 10:04 AM It wont crash it. I have done that several times. It starts up a huge amount of activity, I have no idea what it is doing, but then, it calmly operates without a swap file at all. Now, I suspect that if you crank up a lot of stuff, you will encounter "insuffiecent memory" things, but that's likely all that happens.I just learned last month how to make it use a swapfile instead of a partition, and have been messing with that stuff a lot lately. SUCCESS: Looky: /dev/hda5 / ext2 defaults 1 1 /dev/hda1 /boot ext2 defaults 1 2 /root/swapfile swap swap defaults 0 0 YEAY!!!!!!! Ray stiles 10-14-2001, 01:28 PM I have a simular question. Is there a way to disable filesystem cache for a particular device or mountpoint? Dark Ninja 10-14-2001, 08:15 PM Hmmmmm...guess I didn't phrase my question very well. (And, honestly, I don't even know if this can be done - which is why I'm asking.) See...as I leave my system on for a few days, it starts to dip into the swap file. By the fourth or fifth day, I have almost all of my swap file being used (but the same amount of RAM is free) - is there any way to just flush out the swap file without having to perform a reboot? Like I said - don't even know if it is possible. Dark Ninja error27 10-15-2001, 01:32 AM type top then type 'm' This sorts things by memory. kill -9 (pid) the process that is taking the most memory. Your swap may not go down right away... But don't worry about it. Sometimes the kernel says it is using swap but really it is just marking contiguous portions of it as used so it can use it in a hurry if it decides to. error27 10-15-2001, 01:34 AM stiles I'm not sure what you are talking about... What do you mean by filesystem cache and why would you want to turn it off? stiles 10-15-2001, 02:24 PM Originally posted by error27: <STRONG>stiles I'm not sure what you are talking about... What do you mean by filesystem cache and why would you want to turn it off?</STRONG> I mean filesystem cache, where the VM buffers files in RAM. OK I'm running Oracle, I alocate a SGA to buffer reads/writes (this is a large shared memory area that Oracle uses to buffer many different types of reads and writes). I don't want the OS to duplicate what's already cached in Oracle's memory strucutres. The reason it two fold, one my statistics from V$FILESTAT and V$SYSSTAT that refer to physical reads may not be indicative of actual physical reads cause the read may be from the filesystem cache and not from disk. Second, it's posiable to duplicate the same block in both the buffer cache and the filesystem cache, hence using twice the memory (maybe more, maybe less depending on page size and oracle block size) for one oracle block. I really don't like the second one cause that can cause paging really quick if you have a large SGA. I've seen a /proc filesystem entry that controls the VM's filesystem cache at the system level, but not on a per device level or (better yet) per mount point. justlinux.com
Copyright Internet.com Inc. All Rights Reserved. |