--- On Thu, 7/21/11, Robert Nichols rnicholsNOSPAM@comcast.net wrote:
Perhaps by not storing so much stuff in it? That, or adding more RAM. Seriously, if you're going to fill up a large portion of your available memory with a ramdisk, demands for memory are going to have to be met by pushing pages out to swap space. By default, a ramdisk can grow to up to half of the available RAM after the kernel has been loaded. If programs and I/O buffers need more than the other memory you have available, what option is there besides swap?
Actually I am not storing too much stuff in it since there is plenty of free memory. That was the point of my earlier posts asking why swap when there is plenty of free memory.
Correct me if I am wrong, but I believe behavior is unused files in /dev/shm use swap space? I want to make it so it does not do that since it slows the system down and since there is plenty of available free memory.
Michael McNulty wrote:
--- On Thu, 7/21/11, Robert Nichols rnicholsNOSPAM@comcast.net wrote:
Perhaps by not storing so much stuff in it? That, or adding more RAM. Seriously, if you're going to fill up a large portion of your available memory with a ramdisk, demands for memory are going to have to be met by pushing pages out to swap space. By default, a ramdisk can grow to up to half of the available RAM after the kernel has been loaded. If programs and I/O buffers need more than the other memory you have available, what option is there besides swap?
Actually I am not storing too much stuff in it since there is plenty of free memory. That was the point of my earlier posts asking why swap when there is plenty of free memory.
Correct me if I am wrong, but I believe behavior is unused files in /dev/shm use swap space? I want to make it so it does not do that since it slows the system down and since there is plenty of available free memory. _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Could you please use regular reply option? I can now see 3 separate threads with the same name,and they are only your thread(s). Thanks
Sorry, I am new to using the mailing list. I put RE: in the subject line thinking it would stay in the same thread but not sure why it did not work. So I turned of daily digest to reply and replying directly now. Apologies if this reply did not work.
----------------------------------------
Date: Thu, 21 Jul 2011 22:35:47 +0200 From: office@plnet.rsSend To: centos@centos.org Subject: Re: [CentOS] Memory Usage in Top and System Monitor
Michael McNulty wrote:
--- On Thu, 7/21/11, Robert Nichols rnicholsNOSPAM@comcast.net wrote:
Perhaps by not storing so much stuff in it? That, or adding more RAM. Seriously, if you're going to fill up a large portion of your available memory with a ramdisk, demands for memory are going to have to be met by pushing pages out to swap space. By default, a ramdisk can grow to up to half of the available RAM after the kernel has been loaded. If programs and I/O buffers need more than the other memory you have available, what option is there besides swap?
Actually I am not storing too much stuff in it since there is plenty of free memory. That was the point of my earlier posts asking why swap when there is plenty of free memory.
Correct me if I am wrong, but I believe behavior is unused files in /dev/shm use swap space? I want to make it so it does not do that since it slows the system down and since there is plenty of available free memory.
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Could you please use regular reply option? I can now see 3 separate threads with the same name,and they are only your thread(s). Thanks
--
Ljubomir Ljubojevic (Love is in the Air) PL Computers Serbia, Europe
Google is the Mother, Google is the Father, and traceroute is your trusty Spiderman... StarOS, Mikrotik and CentOS/RHEL/Linux consultant _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Michael McNulty wrote:
Sorry, I am new to using the mailing list. I put RE: in the subject line thinking it would stay in the same thread but not sure why it did not work. So I turned of daily digest to reply and replying directly now. Apologies if this reply did not work.
Um, you're new to email (or only have used Outlook...). Hit <reply> will do that. Don't manually put it in.
mark
Like I said I turned off daily digest to get the individual emails so I could "Hit" <reply>. (rather than copy/paste from here and RE: in subject line).
So do you know how to stop ramdisk from swapping to disk when there is plenty of available memory? I was using /dev/shm but created my own which I suppose is the same thing and have the same issue.
mkdir -p /media/ramdisk mount -t tmpfs -o size=2000M mount -t tmpfs -o size=2000M tmpds /media/ramdisk
----------------------------------------
Date: Thu, 21 Jul 2011 16:56:58 -0400 From: m.roth@5-cent.us To: centos@centos.org Subject: Re: [CentOS] Memory Usage in Top and System Monitorþ
Michael McNulty wrote:
Sorry, I am new to using the mailing list. I put RE: in the subject line thinking it would stay in the same thread but not sure why it did not work. So I turned of daily digest to reply and replying directly now. Apologies if this reply did not work.
Um, you're new to email (or only have used Outlook...). Hit <reply> will do that. Don't manually put it in.
mark
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On 07/21/2011 03:20 PM, Michael McNulty wrote:
--- On Thu, 7/21/11, Robert NicholsrnicholsNOSPAM@comcast.net wrote:
Perhaps by not storing so much stuff in it? That, or adding more RAM. Seriously, if you're going to fill up a large portion of your available memory with a ramdisk, demands for memory are going to have to be met by pushing pages out to swap space. By default, a ramdisk can grow to up to half of the available RAM after the kernel has been loaded. If programs and I/O buffers need more than the other memory you have available, what option is there besides swap?
Actually I am not storing too much stuff in it since there is plenty of free memory. That was the point of my earlier posts asking why swap when there is plenty of free memory.
Correct me if I am wrong, but I believe behavior is unused files in /dev/shm use swap space? I want to make it so it does not do that since it slows the system down and since there is plenty of available free memory.
A ramdisk does not consume any memory at all until you store stuff in it, and then it uses only such memory as is required to hold its current contents, i.e., it will shrink again if stored files are truncated or removed. From your comment, I presumed you knew you were actually storing data in /dev/shm. If you are not, then you will have to look elsewhere to see what is sometimes consuming a lot of memory.
Yes I am copying files there but as my first post shows I have plenty of free memory so I thought it should not be using swap space.
I guess this is my problem. http://www.cyberciti.biz/faq/howto-create-linux-ram-disk-filesystem/
"tmpfs (also known as shmfs) is a little different from the Linux ramdisk. It allocate memory dynamically and by allowing less-used pages to be moved onto swap space. ramfs, in contrast, does not make use of swap which can be an advantage or disadvantage in many cases."
So it looks like I need to use "ramfs" as described here? That sound about right?
----------------------------------------
To: centos@centos.org From: rnicholsNOSPAM@comcast.net Date: Thu, 21 Jul 2011 16:28:15 -0500 Subject: Re: [CentOS] Memory Usage in Top and System Monitor
On 07/21/2011 03:20 PM, Michael McNulty wrote:
--- On Thu, 7/21/11, Robert NicholsrnicholsNOSPAM@comcast.net wrote:
Perhaps by not storing so much stuff in it? That, or adding more RAM. Seriously, if you're going to fill up a large portion of your available memory with a ramdisk, demands for memory are going to have to be met by pushing pages out to swap space. By default, a ramdisk can grow to up to half of the available RAM after the kernel has been loaded. If programs and I/O buffers need more than the other memory you have available, what option is there besides swap?
Actually I am not storing too much stuff in it since there is plenty of free memory. That was the point of my earlier posts asking why swap when there is plenty of free memory.
Correct me if I am wrong, but I believe behavior is unused files in /dev/shm use swap space? I want to make it so it does not do that since it slows the system down and since there is plenty of available free memory.
A ramdisk does not consume any memory at all until you store stuff in it, and then it uses only such memory as is required to hold its current contents, i.e., it will shrink again if stored files are truncated or removed. From your comment, I presumed you knew you were actually storing data in /dev/shm. If you are not, then you will have to look elsewhere to see what is sometimes consuming a lot of memory.
-- Bob Nichols "NOSPAM" is really part of my email address. Do NOT delete it.
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On 07/21/2011 04:57 PM, Michael McNulty wrote:
Yes I am copying files there but as my first post shows I have plenty of free memory so I thought it should not be using swap space.
I guess this is my problem. http://www.cyberciti.biz/faq/howto-create-linux-ram-disk-filesystem/
"tmpfs (also known as shmfs) is a little different from the Linux ramdisk. It allocate memory dynamically and by allowing less-used pages to be moved onto swap space. ramfs, in contrast, does not make use of swap which can be an advantage or disadvantage in many cases."
So it looks like I need to use "ramfs" as described here? That sound about right?
A ramfs is still using memory. If the remaining memory is inadequate to satisfy the needs of processes, _something_ is going to be forced out to swap. Since that won't be the pages used by the ramfs, it will be pages in use by processes. Whether that is better or worse, from a performance standpoint, than swapping out pages from your tmpfs files is something you would have to determine, but there is no free lunch here.
One thing that may be confusing your view of free memory is that a tmpfs uses pages from the buffer cache, and the 'free' command shows that usage in the "cached" category. (No, I didn't realize that, either.) This is a place where pages listed as "cached" are _not_ available to satisfy processes' memory requests. It looks like you need to run "df -t tmpfs" and add up the numbers in the "Used" column to see how much memory falls in the category of "looks like cached, but can't be discarded."