I have 6GB RAM and 10GB swap. Some applications dare to consume/allocate/use about 5GB to 6GB of RAM.    When the memory completely fills out, the whole system hangs for 1 to 2 minutes to swap all inactive (and active) appplications, what is really troublesome because to access again some simple applications that consume less than 100MB, I have to wait about 10s to it be put on RAM again (well, all that is how I see it works out of my usage experience).  So, my goal is: put that single application under leash, restrict it to keep the whole system fast and stable.
123618
/proc/sys/vm/swappiness is nice, but I want a knob that is per process like /proc/$PID/oom_adj. So that I can make certain processes less likely than others to have any of their pages swapped out. Unlike memlock(), this doesn't prevent a program from being swapped out. And like nice, the user by default can't make their programs less likely, but only more likely to get swapped. I think I had to call this /proc/$PID/swappiness_adj.
89035
I have a relatively new (under 2 yrs old) Windows 7 machine. It has 9GB of RAM, and an i7 core CPU (930 @ 2.8GHz w/ 8 CPUs). After about 8 months since a clean install, I noticed my computer was running slowly. I figure it was fragmentation etc, and I did a complete wipe &amp; clean reinstall.  However, my problems are somehow persisting. The computer is running painfully slowly (but in leaps and bounds - sometimes it will work fine for 3 hrs, then suddenly freeze up just from clicking the start button). The 'freezes' happen randomly - not during any especially intensive computing. I initially thought something might be eating through my CPU and/or Memory, but Task Manager indicates that neither the CPU or Memory spike. In fact, even during serious lag, CPU usage remains at less than 5% and Memory at ~ 1.5GB.  It's beyond me why a fresh install on a powerful machine is performing so poorly. And it certainly is frustrating!  What could be causing the poor performance, and what can I do to fix it?
97566
from the above pic, you can see we have 3191 RAM free, but at the same swap is also using about 661 bytes. why it is occurring ? can any give a glance regarding this.  Thanks
114
I'm currently using a Joyent Accelerator to host my webapps, and it's working fine, however I need to reduce costs so I'm downgrading my current plan and that imposes some new memory limits (256M rss, 512M swap). I wasn't too far over them yesterday, but after restarting Apache several times today, I'm now 411M rss, 721M swap (prstat -Z -s cpu).  Searching in Server Fault only gives me lots of ways and specific tools to monitor the server, but no advice on how to reduce/optimize it's memory usage. I've also seen , but I don't think it's good for this particular (or may I say generic?) situation.  The server is running Solaris on a shared CPU, and I'm using a Apache + MySQL + PHP stack.  I'm interested in knowing the steps one can take to troubleshot this and solve the issues. However, I'm also running out of time to lower my memory foot print and downgrade the plan before the current ends, so anything that can make magic and save the day is welcome as well :)
41033
RAM is just used for temporary storage. But since this storage is in the cpu memory (RAM) it is fast. Programs can easily read/write values into it. I've noticed more the RAM less time it takes for the application to load/execute. But doesn't this actually depend of the processor speed (MHz or GHz values). I am wondering what is the science/relationship between processor speed and RAM.
8082
I have just turned on my PC and have two applications running; Thunderbird and Firefox. Whatever else is running is part of Ubuntu's feature set (as well as a few indicators).  This has been ongoing for weeks, so I'm not sure if it's normal behaviour or not.  Right now, my memory usage indicator says that Ubuntu is using 41% of my 6GB of RAM. I haven't even opened Gimp or my other day-to-day things. I'll be buying another 6GB of RAM, this week, so that I don't run out when using Gimp or Openshot, for example.  An overview of my running applications shows that Nautilus is using the most, yet it isn't even open. This seems a little excessive, or am I missing something?
41179
I have 4GB of RAM and I want to install Ubuntu. Do I need a to have a swap partition? Because my computer has 4GB RAM, I do not think it is necessary to have a swap partition. If I do need to have a swap partition, should it be a 4GB or an 8GB partition?
66407
Possible Duplicate:          I have been working on computers for quite some time now and realize the importance of virtual memory.  I have been assuming that setting this to twice the amount of RAM installed is what is necessary.  However, as memory has been growing over the years, I am wondering if this is still true.  For example, on my 6 GB RAM system is it best practice to set the virtual memory size to 12 GB? For smaller ram systems, is it worthwhile in performance to set the virtual ram to something even more (i.e. 1GB physical ram and 3GB virtual)?
110604
Recently, I put more ram into my server and now I have got a total of 24GB of RAM. Originally, I setup the OS to have a 2GB swap size.  /dev/sdc1               1         281     2257101   82  Linux swap / Solaris /dev/sdc2   *         282       60801   486126900   83  Linux   2GB is allocated for swap currently, but reading around it seems it is not much. For a system with 24GB, I am thinking to allocate at least 10GB of swap.   My questions is: Can I do it while the OS is running? Do I have to reinstall?  I am using OpenSuse 11.3
42246
I have been having an issue where, if my system is up for a few days without being rebooted I will start getting warnings saying "Close programs to prevent information loss" and then a dialogue suggesting I close programs, which I can either cancel or hit "close programs" and Windows will force close some or all of the applications listed in the dialog.  I open task manager, and see that only around 30% of my memory is currently being used:    When I open resource monitor to see how much committed memory is being used by specific applications, I still see relatively low memory usage:    I've had this problem for awhile and have struggled to find a solution. I've investigated causes like a driver leak by using poolmon, but never saw anything in poolmon that matched what others have described as red flags for a driver memory leak. What makes me particularly confused is why Win10 is telling me to close applications when I only have 33% of system memory being used.
121923
My PC has 8 Gb of ram. Is there any way to make ubuntu use most of it? I mean rarely drop caches and keep once opened programms in ram longer, preload apps on boot, etc.
47193
I have a Samsung Galaxy S (AT&amp;T Captivate) that is rooted.  I have various ways to tweak the amount of free RAM the OS leaves on the phone.  The default is 48 MB, but I was wondering if I could actually go lower without impacting phone performance.  Are there guidelines posted anywhere, or that can be deduced based on knowledge of the Android platform?  Or should I trust that the default settings are appropriate?  I understand that when it comes to free RAM, more isn't necessarily better, but I understand that there is still a threshold that I don't want to dip below.   I'm running a 2.3.6 Gingerbread based ROM.  For what it's worth, I'm running the Zeam launcher.
76075
I have a Motorola phone, with 8GB of internal memory.  To my surprise, in a few days, I had 474MB of free space, but couldn't install a 338KB app!! So, clearly the limit of ~25MB referred to in some comments ( and ) are not always the case. A user just told me the following:     Actually it's "25MB or 10% of the storage", whichever is hit first. So   with e.g. 10 GB internal storage, it would hit you as soon as you drop   below 1 GB free. Crazy, but that's what it is.   Actually, that's not correct, because I didn't have to free up 1GB of internal memory. But anyway, half a gigabyte is enough to run a full operational system. I've seen similar complaints of hundreds of MB not enough to install apps ~ 1MB or similar small operations ( and ).  What's wrong here?
65415
I have 4GB RAM. When I open Firefox, IntelliJ IDEA or VS Code and some other application my memory is about used up thus my machine hangs and I can't do anything. I can't even close any applications.    Date and time are shown in the top bar so that I can view it any time without any thing typing.   If I would view memory status in this way without typing anything then I can make a decision whether to open an application or whether this application may put my machine in hanging state or not.    Is it possible in Ubuntu 18.04 LTS?
100024
Due to space constraints, I need to purchase a laptop to replace my desktop computer. However I don't know whether I need a laptop with 8GB or 16GB of RAM. My desktop currently has 16GB.  What is the easiest way to run something in the background to determine my typical RAM usage over a period of, say, a month? My goal is to have enough data to base my RAM purchase on real-world usage of my desktop.  I've seen a few articles describing how to use Performance Monitor to do this, but they all seem to suggest different things to monitor. Several of them also talk about measuring my swap, which I don't believe I should be interested in.
4116
I read many places that the rule of thumb for swap space is to double the amount of physical RAM. However, 32 GB does seem a LOT. Do I need that much? Do I need it at all with this high amount of physical RAM?
45257
When we want to setup a linux system, there is a common a suggestion to set the swap space  twice as big as your physical memory. I want to know why do we need this, and how it is this suggestion come to be?