Sometimes, either because of a memory leak or the computationally-intensive nature of a program, applications can start to slow down and ultimately freeze the whole system by claiming too much RAM or CPU time (or at least I think that's what's happening - please enlighten me if it's more complicated). I was wondering if it was possible to ringfence a certain amount of RAM or 'CPU time' for use purely by important system applications (basically anything not explicitly started by me - including the desktop environment) so that a greedy application can't freeze the whole system.  If it is possible, I'd also be curious as to why Ubuntu doesn't do it by default.
123194
I have a process for an application which needs to run, but ends up using far too much IO usage for what it does. And really crashes my computer, making it impossible to do anything else whilst it is running.  So I was wondering if there is a way to limit IO usage, RAM and CPU for a given process? And its sub-processes of course.  This is on my Ubuntu 18.04 LTS system.
68669
We are trying to develop a small application that can monitor the programs/processes that are executing in a windows machine.  If the program/process is not supposed to run, it should be blocked. It works similar to an antivirus.  This is the basic idea.  I want to know the ways to hook into the OS to get notified about every single program/process trying to run in the machine.
34712
Ubuntu has been crashing on me recently. I think its because it runs out of memory so I ran the free -m command and found that my memory usage was really high. So then, i ran top to find the culprit, but the displayed processes were using less than 1.5% of memory. How do I know which program is making ubuntu crash/run out of memory? Below is the output:  shafee@shafee-pc:~$ free -m              total       used       free     shared    buffers     cached Mem:          3824       3714        110          0        978       1954 -/+ buffers/cache:        780       3044 Swap:           99          0         99  shafee@shafee-pc:~$ top top - 02:12:14 up  1:24,  2 users,  load average: 0.16, 0.42, 1.49 Tasks: 182 total,   1 running, 181 sleeping,   0 stopped,   0 zombie Cpu(s):  2.9%us,  1.9%sy,  0.3%ni, 79.3%id, 15.5%wa,  0.0%hi,  0.2%si,  0.0%st Mem:   3916708k total,  3803848k used,   112860k free,  1002308k buffers Swap:   102396k total,        0k used,   102396k free,  2001852k cached    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND              4200 root      20   0  289m  53m  38m S    2  1.4   1:06.45 Xorg                 5590 shafee    20   0 19348 1368  956 R    2  0.0   0:00.01 top                     1 root      20   0 24124 2136 1264 S    0  0.1   0:02.05 init                    2 root      20   0     0    0    0 S    0  0.0   0:00.00 kthreadd                3 root      20   0     0    0    0 S    0  0.0   0:24.23 ksoftirqd/0             6 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/0             7 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/1             9 root      20   0     0    0    0 S    0  0.0   0:00.11 ksoftirqd/1            11 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/2            13 root      20   0     0    0    0 S    0  0.0   0:03.89 ksoftirqd/2            14 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/3            16 root      20   0     0    0    0 S    0  0.0   0:00.16 ksoftirqd/3            17 root       0 -20     0    0    0 S    0  0.0   0:00.00 cpuset                 18 root       0 -20     0    0    0 S    0  0.0   0:00.00 khelper                19 root       0 -20     0    0    0 S    0  0.0   0:00.00 netns                  21 root      20   0     0    0    0 S    0  0.0   0:00.01 sync_supers         shafee@shafee-pc:~$   Or is it normal to have 110mb of free memory and is my issue related to something else?
107775
There's a serious problem that's come up especially in Mojave and Apple seems to not really be interested in resolving this from my discussions with engineers in the know. It especially manifests itself when opening certain apps and subprocesses therein (two examples are python and emacs). This didn't seem to be so much of a problem initially in Mojave, but it's getting worse and it most certainly was not a problem in High Sierra.  It appears to happen due to tccd ( ; there are many mentions of these issues in obscure spots around) somehow generating some additional overhead that wasn't present before in previous OS releases.  While Apple may consider this to be acceptable, there are many of us who are struggling with the additional time that it's adding to process spawning.  This seems to be able to be reproduced via any app that's existent under any of the sections under System Preferences → Security &amp; Privacy → Privacy.
36034
My Windows 10 laptop with an i7 and 16 GB of RAM often gets the fans going full speed when I am not using it. It is a bit slow to respond sometimes when I try to wake it up to check what is going on. Every time I try to open the Task Manager to check out the Details tab and see what is using the CPU, nothing shows up. I'm running as admin, and all tasks are showing. I am guessing the system is hiding what it is working on because it is seen as a "system" task.  What is a good tool to use that will monitor and report what is utilizing CPU? I've used ProcMon before, but I didn't find the output particularly accurate or helpful.  More importantly, how can I stop this from happening? I am quite annoyed that so much software feels the need to do things when my computer is idle. Is there something like ZoneAlarm, but for CPU?
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.
17526
I think I'm being the victim of a bug here. Sometimes while I'm working (I still don't know why), my network traffic goes up to 200 KB/s and stays that way, even tough I'm not doing anything internet-related.   This sometimes happens to me with the CPU usage. When it does, I just run a top command to find out which process is responsible and then kill it. Problem is: I have no way of knowing which process is responsible for my high network usage. Both the resource monitor and the top command only tell me my total network usage, neither of them tells me process specific network info.  I've found questions here about monitoring total bandwidth usage, but, as I mentioned, that's not what I need. Is there another command I can use to find out which process is getting out of hand?  The command iftop gives results that disagree entirely with the information reported by System Monitor. While the latter claims there's high network traffic, the former claims there's barely 1 KB/s.  I've already tried killing all the obvious ones (Firefox, update-manager, Pidgin, etc) with no luck. So far, restarting the machine is the only way I found of getting rid of the issue.
108400
There are a lot of system apps in my mobile that I do not use, and have no intention of ever using. I know that is is possible to , but is it possible without root?  Are there any non-root options that will help me to deal with unwanted system applications?
539
A background process/program steals focus from my currently active application. It disturbs me a lot when I type in an app or control an app using keyboard or play online flash games in full-screen. I want to remove this program from my PC, but I'm unable to detect it. I've analyzed all processes &amp; scanned for viruses. All things are right from this side. I don't want to change focus behavior using registry tweak. Please, help me detecting that app..
82916
So I have 4 GB RAM + 4GB swap. I want to create a user with limited ram and swap: 3 GB RAM and 1 GB swap. Is such thing possible? Is it possible to start applications with limited RAM and swap avaliable to them without creating a separate user (and not installing any special apps - having just a default Debian/CentOS server configuration, and not using sudo)?  Update:  So I opened terminall and typed into it  command: ulimit -v 1000000 which shall be like 976,6Mb limitation. Next I called ulimit -a and saw that limitation is "on". Then I started some bash script that compiles and starts my app in nohup, a    nohup ./cloud-updater-linux.sh  &gt;&amp; /dev/null &amp;... but after some time  I saw:    (which would be ok if no limitations were applied - it downloaded some large lib, and started to compile it.)  But I thought I applied limitations to the shell and all processes launched with/from it with ulimit -v 1000000? What did I get wrong? How to make a terminal and all sub processes it launches be limited on ram usage?
84293
I have some sensitive data in RAM that I prefer not to be on disk. How do I disable swap?  I have more than enough RAM. If RAM consumption gets too high I have no problems with processes being terminated. How do I disable swap?  Note: I do not have a swap partition and this is running in a VM ()
87784
Can anyone explain how Windows effectively limits the CPU?  Last time I tried some tricks to let my laptop not overheat, so I tried limiting the CPU to 70%.   As for my suprise it stopped my laptop from overheating - even when launching CPU intensive applications which caused my laptop to overheat and shut down, didn't overheat my laptop anymore!  I looked at task manager but the "CPU intensive" application still uses ~95% of CPU and the windows task manager shows a total of 100% CPU usage.  I have limited the CPU usage here ("plugged in" option was on 70% [both min and max] when testing the CPU intensive application):    How does Windows do this magic?   I see 100% CPU usage yet my CPU does not overheat. And I do not see any performance differences.  Does Windows limit the CPU speed? Like, if I have a 2.4 GHz processor, on 70% it will only have 1.68 GHz when limited? How is this possible (changing the CPU speed)? I thought you can only underclock when in BIOS?  If not, how does Windows accomplish this if not by changing the speed?    Side question: If it's about the speed, is there a way to set the CPU max state to 200% ?
80413
I tried to rm -rf a folder, and got "device or resource busy".  In Windows, I would have used LockHunter to resolve this. What's the linux equivalent? (Please give as answer a simple "unlock this" method, and not complete articles like . Although they're useful, I'm currently interested in just ASimpleMethodThatWorks™)
1741
I once had the task of determining the following performance parameters from inside a running application:   Total virtual memory available Virtual memory currently used Virtual memory currently used by my process Total RAM available RAM currently used RAM currently used by my process % CPU currently used % CPU currently used by my process   The code had to run on Windows and Linux. Even though this seems to be a standard task, finding the necessary information in the manuals (WIN32 API, GNU docs) as well as on the Internet took me several days, because there's so much incomplete/incorrect/outdated information on this topic to be found out there.  In order to save others from going through the same trouble, I thought it would be a good idea to collect all the scattered information plus what I found by trial and error here in one place.
112500
I have 3987MB of RAM on my laptop. Task (System) Manager says that I am using 700MB of this RAM, whilst the command "free -m" says I am using nearly 1500MB. Which one is correct and why do they show two different values?   Thanks for any help.
13652
time is a brilliant command if you want to figure out how much CPU time a given command takes.  I am looking for something similar that can measure the max RAM usage of the program and any children. Preferably it should distinguish between allocated memory that was used and unused. Maybe it could even give the median memory usage (so the memory usage you should expect when running for a long time).  So I would like to do:  rammeassure my_program my_args   and get output similar to:  Max memory allocated: 10233303 Bytes Max memory used: 7233303 Bytes Median memory allocation: 5233303 Bytes   I have looked at memusg  but I regard that as somewhat a hack.
30094
I am looking for an unbreachable way to disable the games running on my PC. Even games which require quite a low amount of graphics say 256MB should not work. It is to put restriction on gaming on my PC. I have a graphics card of 1GB and  2GB RAM and a processor of 2.7GHz with Windows 7.  Can we prevent a process from running if it takes a certain amount of graphics memory greater than a value set by user? I mean can we put restriction on games on the basis of the amount of graphics memory they use. Also the method should be applicable to all games (ignoring the chess and other small games like that. Even if it gets blocked, then also no problem.  This is to prevent myself from playing games. But I need other software (non game) to run properly.