Friday, 2018-03-23

*** huntxu has joined #openstack-qinling01:15
*** caoyuan has joined #openstack-qinling01:49
*** jiangyuan has joined #openstack-qinling01:57
*** caoyuan_ has joined #openstack-qinling02:02
*** caoyuan has quit IRC02:04
jiangyuanhi, kong! Do you have any related documents about ' the ulimit will limit the resource uasge in current process *AND* its subprocesses'?  I just saw 'A child process created via fork(2) inherits its parent's resource limits' in Linux man page.02:10
kongjiangyuan: for your testing here https://paste.ubuntu.com/p/sKdP3VgJtM/, which user did you use?02:16
jiangyuanyuan@yuan-ThinkPad-T430:~/pythonText$ python testRLIMIT.py02:20
jiangyuan(209715200, 209715200)02:20
jiangyuanand huntxu provided this test02:21
kongjiangyuan: have you tested the process number?02:24
kongi need to refresh my mind from k8s to linux rlimit and i need to test the memory eating behavor again02:26
*** yufei has joined #openstack-qinling02:32
*** yufei has quit IRC02:37
huntxukong: while subprocesses are sleeping(line 10 of the script), ps aux shows 50 more processes with the same commandline02:37
jiangyuanTest result:https://paste.ubuntu.com/p/wG5ptjG5f3/02:38
huntxukong: and via free, I also observed ~2G more memory occupied and then freed after the running finished02:38
*** yufei has joined #openstack-qinling02:39
huntxujiangyuan: wow, the VSZ on your machine is quite smaller than mine, I guess you have to lower the limit to 100MiB so that the non-forking path would hit MemoryError02:41
konghuntxu, jiangyuan, thanks for your investigation, please give me some time before I do the test, i have to some other higher prioritiy things need to do02:41
kongbut, besides the memory, could you please also test the process number if you are available?02:42
kongand make sure the script is running using non-root user02:42
huntxukong: Yes I'm running it non-root. For the process number, you mean the 128 NPROC limit? I would give it a try02:43
konghuntxu: yes, that's what i'm talking about, thanks!02:43
huntxukong: Update some information, for the NPROC_LIMIT, I tested it and it is verified that fork bomb will be prevented, no more that the NPROC_LIMIT processes can be created03:26
yufeihello, qinlingers, I'm from china insea research center,  I and my colleagues will work on qinling recently.  :)03:27
huntxukong: then I believe that the doc of the setrlimit manpanges is correct, RLIMIT_NPROC is in fact limiting The maximum number of processes (or, more precisely on Linux, threads) that can be created for the real user ID of the calling process.03:27
huntxukong: FYI https://linux.die.net/man/2/setrlimit03:27
huntxukong: so I created a new qinling function to fork 80 processes and then sleep for a while, start two function executions asynchronously. They are scheduled to run on the same pod03:28
huntxukong: and unfortunately, the later created execution failed for the reason of too much resource consumption03:29
*** caoyuan_ has quit IRC03:29
huntxukong: so that means if more than one execution is running on the pod, they will share the NPROC_LIMIT together.03:31
huntxujiangyuan: ^03:31
konghuntxu: ok, i will do more test during the weekend as i will get off work soon. i will let you know my findings so we could work together about how to restrict the resource usage for individial function exeuction03:33
kongyufei: welcome to qinling :-)03:34
yufei(๑¯◡¯๑)03:35
kongyufei: feel free to ask if you have any question, but be sure to stay here (using irccloud or znc) otherwise you will miss the reply :-)03:36
huntxukong: ok03:38
yufeithanks for reminding, I will invite my partener to this channel too, we now start from review qinling and will try to commit latter.03:38
kongyufei: awesome03:38
*** liusheng has quit IRC03:47
*** Steven_Gao has joined #openstack-qinling03:47
*** Steven_Gao has quit IRC03:47
*** Steven_Gao has joined #openstack-qinling03:47
*** liusheng has joined #openstack-qinling03:47
*** caoyuan has joined #openstack-qinling04:05
*** Steven_Gao has quit IRC04:36
jiangyuanhuntxu: Did you set  NPROC limit in the parent process(the flask app) when testing?05:20
huntxujiangyuan: the current implementation python2.7 runtime sets the limit to 12905:37
huntxu12805:37
huntxujiangyuan: so I fork 80 processes in a function and create two async executions05:38
jiangyuanhuntxu: ok, I see05:40
jiangyuanhuntxu:So, based on your test, each execution in its individual subprocess will share RLIMIT_NPROC number which is set in every subprocesses05:44
huntxujiangyuan: the NPROC limit should be considered based on user, it limits how many processes a user can create05:46
huntxujiangyuan: two qinling executions run on the same pod, so they are run by the same user in the k8s pod05:47
huntxujiangyuan: I guess if they run in different pods, they won't affect each other, as different pods should be seperated by namespaces(pid, user...)05:48
jiangyuanhuntxu: So, no matter in which subprocess we set the NPROC limit, the NPROC limit will work on the user . But RLIMIT_CPU/AS will not?05:51
huntxujiangyuan: yes, I think so, IIUC from the setrlimit(2) manpages05:52
jiangyuanhuntxu: ok, thx05:52
*** cctopusZhang has joined #openstack-qinling05:53
*** yufei has quit IRC05:54
*** cctopusZhang is now known as yufei05:54
*** yufei has quit IRC06:18
*** yufei has joined #openstack-qinling08:22
*** cctopusZhang has joined #openstack-qinling09:01
*** yufei has quit IRC09:04
*** cctopusZhang is now known as yufei09:04
*** yufei has quit IRC09:45
*** yufei has joined #openstack-qinling09:46
*** caoyuan has quit IRC09:59
*** yufei has quit IRC10:11
*** larainema has quit IRC10:15
openstackgerritMerged openstack/python-qinlingclient master: Updated from global requirements  https://review.openstack.org/55325810:26
*** jiangyuan has quit IRC10:34
*** larainema has joined #openstack-qinling10:47
*** caoyuan has joined #openstack-qinling10:52
*** caoyuan has quit IRC11:08
*** caoyuan has joined #openstack-qinling11:20
*** caoyuan has quit IRC11:25
openstackgerritHunt Xu proposed openstack/qinling master: engine: delete workers from etcd after removing  https://review.openstack.org/55574411:38
openstackgerritHunt Xu proposed openstack/qinling master: engine: delete workers from etcd after removing  https://review.openstack.org/55574411:44
*** caoyuan has joined #openstack-qinling11:59
*** caoyuan has quit IRC12:04
*** huntxu has quit IRC12:13
*** caoyuan has joined #openstack-qinling14:28
*** caoyuan_ has joined #openstack-qinling14:34
*** caoyuan has quit IRC14:37
-openstackstatus- NOTICE: zuul.o.o has been restarted to pick up latest code base and clear memory usage. Both check / gate queues were saved, be sure to check your patches and recheck when needed.14:52
*** rbrady is now known as rbrady-afk15:12
*** caoyuan_ has quit IRC15:31
-openstackstatus- NOTICE: Gerrit will be temporarily unreachable as we restart it to complete the rename of some projects.15:50
*** openstackgerrit has quit IRC19:34
*** liusheng has quit IRC23:32
*** liusheng has joined #openstack-qinling23:33

Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!