[issue26562] Large Involuntary context switches during oom-killer

2016-03-15 Thread Damian Myerscough
Damian Myerscough added the comment: Thanks for the feedback, I will continue to dig into this. I know processes go crazy sometimes when OOM killer kicks off, I just wanted to rule out a Python bug or if anyone in the community has seen this before. Thanks -- ___

[issue26562] Large Involuntary context switches during oom-killer

2016-03-15 Thread STINNER Victor
STINNER Victor added the comment: > When oom-killer is trigger IMHO this is your root problem. > When oom-killer is trigger I see a large number of involuntary context > switches ... The principle of *involuntarty* context switches is that the application is not responsible for them. > I tr

[issue26562] Large Involuntary context switches during oom-killer

2016-03-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Why would it be a Python issue? By construction I doubt the OOM killer lets the process run anything before force-killing it. -- nosy: +pitrou ___ Python tracker _

[issue26562] Large Involuntary context switches during oom-killer

2016-03-14 Thread Damian Myerscough
Damian Myerscough added the comment: @rbcollins there is nothing else running in the Docker container other than the python interpreter. I did an `strace` of the process mmap(NULL, 3149824, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7effc2d0c000 munmap(0x7effc300d000, 790528)

[issue26562] Large Involuntary context switches during oom-killer

2016-03-14 Thread Robert Collins
Robert Collins added the comment: So this test script is making a 65K entry dict, and each item is a new, separate 65K string. The strings are allocated in single chunks, so we should expect couple hundred reference count writes total. AIUI involuntary context switches occur when there is CPU

[issue26562] Large Involuntary context switches during oom-killer

2016-03-14 Thread STINNER Victor
STINNER Victor added the comment: I don't understand this issue... I don't see how Python can avoid context switches when writing data to memory... -- nosy: +haypo ___ Python tracker __

[issue26562] Large Involuntary context switches during oom-killer

2016-03-14 Thread Damian Myerscough
New submission from Damian Myerscough: I have been running a simple script inside a Docker container to cause the container to trigger oom-killer. >>> mem = {} >>> for i in range(65535): ... mem[i] = "A" * 65535 When oom-killer is trigger I see a large number of involuntary context switche