Consider a Linux process that is currently running. We want to limit the amount of RAM used by this process so that it does not interfere with the operation of the system. What tools or commands can be used for this? (I've seen different answers but either they didn't work or they were suitable for processes that wanted to run from the start, not for processes that are currently running)
-
Does this answer your question? How can I trigger Firefox memory cleanup from the terminal? Also check this: How to best hard-limit my Firefox' memory hogging?Artem S. Tashkinov– Artem S. Tashkinov2024-06-15 15:35:31 +00:00Commented Jun 15, 2024 at 15:35
-
@ArtemS.Tashkinov Nouser16385455– user163854552024-06-16 06:51:29 +00:00Commented Jun 16, 2024 at 6:51
-
How does it not answer your question when it contains the exact instructions how to limit RAM usage of any process on Linux?Artem S. Tashkinov– Artem S. Tashkinov2024-06-16 11:23:24 +00:00Commented Jun 16, 2024 at 11:23
-
This is already answered here -> unix.stackexchange.com/questions/44985/…cpu– cpu2024-06-16 20:32:38 +00:00Commented Jun 16, 2024 at 20:32
-
@ArtemS.Tashkinov Thanks for your reply. I tested different solutions like timeout and cgcreate. The main problem is that the process I want is already running on the system. With this assumption, because it works with files such as log files, the provided solutions cannot be applied. For this reason, I stopped the desired process and then using the provided solutions, I ran it by applying a limit to the RAM, but after the amount of RAM consumed by this process reached the desired threshold, it was killed by itself!user16385455– user163854552024-06-18 11:10:12 +00:00Commented Jun 18, 2024 at 11:10
|
Show 3 more comments