V
V
Viktor Vsk2014-04-19 09:37:52
linux
Viktor Vsk, 2014-04-19 09:37:52

Ubuntu - The process is being killed by the kernel due to resource consumption. Whether it is possible to allow it to be executed long (or parts)?

I don't know how to formulate the question correctly, but it seems that the task is trivial and should have been solved many times.
I will formulate in general:
There is a process that, when executed, requires a certain amount of resources (for example, locally - everything works, on a weak VPS - it writes killed at a certain moment and the dmesg command displays Out of memory in UB ...).
The task is such that this process is launched relatively infrequently and it is allowed that it runs for an arbitrary time.
I understand that it is easy to cure with more powerful iron, but still.
As I understand it, it is not so important here which Linux distribution, which application calls the process, etc. If I am wrong, I will clarify in full.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Lesovsky, 2014-04-19
@viktorvsk

OOM Killer comes when the kernel runs out of memory, apparently your process consumes too much memory))).
There are two options here:
1. set -1000 in /proc/$pid/oom_score_adj (in this scenario, OOM will come but crash someone else with a lower oom_score_adj value).
2. increase the swap. Thus, the amount of virtual memory will increase, and when you complete your task, you will most likely start swapping, but OOM will not come. (And you won't have to spend money on hardware)
Well, monitor this process of yours, why does it consume so much memory? maybe it's leaking?

V
Vlad Zhivotnev, 2014-04-19
@inkvizitor68sl

Swap add. OOM will stop coming.
oom_score_adj will not help, most likely because this process is trying to consume all the memory that is available.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question