Thursday, 2018-03-22

*** caoyuan has joined #openstack-qinling00:52
*** caoyuan has quit IRC01:03
*** huntxu has joined #openstack-qinling01:18
*** liusheng has quit IRC01:26
*** liusheng has joined #openstack-qinling01:27
*** jiangyuan has joined #openstack-qinling01:47
jiangyuanhi, kong ! Could you please give a little hint about the kind of bugs which may appear when invoking the image type function in parallel?02:00
*** caoyuan has joined #openstack-qinling02:31
jiangyuanAnd in python2.7 runtime server , what if user functions fork extra subprocess ,  so we may need to use some methods like cgroup  to control function process and its subsequent subprocesses,right?02:32
kongjiangyuan: we only need to restrict the root process of user's function, the current way in python runtime reference implenmention is correct, and don't need to change02:33
konghttps://github.com/openstack/qinling/blob/aa358e5e6689d0843b59b3f30efa2c2b88c55761/runtimes/python2/server.py#L7902:33
kongin user's function they can create extra subprocesses, but can not break the limit for the root process02:34
kongso, for package/swift type function, we don't need to define resource limit in pod definition02:35
kongfor customized resource limitation, we need to pass user's param to the runtime and set resource limit for root process02:36
kongbecause qinling will garantee one pod only mapping to specified number of function invocation, so we don't need to set resource limit for pod02:37
kongthe potential bug i mentioned is, when you invoke image type function in parallel, maybe some execution will fail. because image type function is not long running pod02:40
kongwhich i need to write something in qinling's doc02:40
kongjiangyuan, in other word, you need to customize thing here: https://github.com/openstack/qinling/blob/aa358e5e6689d0843b59b3f30efa2c2b88c55761/runtimes/python2/server.py#L51-L5302:43
kongjiangyuan: btw, understanding more about ulimit usage will help you implement this feature02:44
jiangyuankong: yes I know. What means is that the resource.setrlimit will just affect the root process, but if function fork extra subprocess, can we control their total use of resources?02:46
kongjiangyuan: the ulimit will limit the resource uasge in current process *AND* its subprocesses02:48
kongfor example, you define the process A can use 100M memory, no matter how many subprocesses that the process A creates, the total memory usage of all the processes won't exceed 100M02:50
jiangyuanOh, that will be great.02:51
kongjiangyuan: do you mind wrting something before you change the code? just like the bp specification as other projects02:52
kongso we could reveiw the whole idea before you waste time on the implemenation that could change a lot as review goes on02:53
jiangyuanby the way, the resource.RLIMIT_CPU is  about seconds, I wonder if we can use cpu param and timeout param to generate the value02:53
jiangyuanOK02:53
kongjiangyuan: so can you create a new folder called 'spec' under 'doc/source' folder and create a new file in the formatting of  openstack spec doc02:55
jiangyuanOK,02:56
kongjiangyuan: just write your basic idea is ok, including the problem you are aiming to solve, the api change and the rough implemenation detail02:58
kongjiangyuan: do you need me to create a spec template first02:59
kongso you can write your own accordingly02:59
jiangyuankong: That will be greate!02:59
kongok02:59
jiangyuanthans a lot03:00
openstackgerritLingxian Kong proposed openstack/qinling master: Add specs folder for Qinling  https://review.openstack.org/55514003:21
kongjiangyuan: fyi03:21
konghuntxu: when you are here, please review https://review.openstack.org/55514003:22
kongaftger its merge, jiangyuan could start his feature description there and we could track our discussion in gerrit03:22
jiangyuanI have been busy with graduation design recently ,so  it may be updated a little later03:27
kongjiangyuan: that's ok, let me know if you have any problems with this03:27
jiangyuanBut I will do it as soon as possible03:28
kongjiangyuan: cool, thanks03:28
openstackgerritLingxian Kong proposed openstack/qinling master: Add specs folder for Qinling  https://review.openstack.org/55514004:48
huntxukong: jiangyuan I still have concerns about the memory usage limitation, with some research, I found the subprocesses created via fork() only inherits but not shares the limitation with the root process06:10
huntxujiangyuan: kong I created a PoC script to verify this https://paste.ubuntu.com/p/sKdP3VgJtM/06:10
huntxuI cannot create two strings with 40M memory in the root process, but with multiprocessing, I can spawned 50 subprocesses and each create one 40M memory string respectively06:11
huntxujiangyuan: RLIMIT_AS limits the VSZ of the "ps" output. Python itself requires ~150M memory, so with a 40M size string, VSZ is ~190M and RSS is ~40M. So creating a new 40M string will increase the VSZ to ~230M beyond the limit06:15
*** jiangyuan has quit IRC07:12
*** jiangyuan has joined #openstack-qinling07:27
jiangyuanhuntxu: I just saw 'A child process created via fork(2) inherits its parent's resource limits' in Linux man page.  We may ask kong to show us some related documents if possible !09:21
jiangyuanhuntxu: for VSZ & RSS, you mean that RSS will affect VSZ?09:22
*** jiangyuan has quit IRC09:22
*** jiangyuan has joined #openstack-qinling09:22
huntxujiangyuan: without swapping, RSS & VSZ both include stack & heap memory IIUC09:29
huntxujiangyuan: you can refer to https://stackoverflow.com/questions/7880784/what-is-rss-and-vsz-in-linux-memory-management09:32
openstackgerritNeerja Narayan proposed openstack/qinling master: Removed extra underscore in tempest unit tests  https://review.openstack.org/55521409:33
*** caoyuan has quit IRC09:59
openstackgerritOpenStack Proposal Bot proposed openstack/qinling master: Updated from global requirements  https://review.openstack.org/55523610:09
*** Neerja has joined #openstack-qinling10:50
NeerjaHi, I am interested in contributing to Qinling Project. I am currently looking into writing test cases for python-Qinlingclient project.  Is there any documentation to start of with?10:53
NeerjaThank you :)10:54
openstackgerritMerged openstack/qinling master: Updated from global requirements  https://review.openstack.org/55523610:59
jiangyuanhuntxu: yes, I have seen the comments. Actually, RLIMIT_AS represents all the allocated virtual memory a process can use, but it may not be used yet. So, VSZ just shows the virtual memory that have been used indeed.11:58
jiangyuanhuntxu: And before running the function, the process will occupy some of the memory12:00
*** rbrady-afk is now known as rbrady12:13
jiangyuanSo, if set RLIMIT_AS to 200M, python itself requires ~150M memory, then only 50M can be used by function. This is reasonable, because the memory resource that user applied for is not just for function to use12:13
openstackgerritNeerja Narayan proposed openstack/python-qinlingclient master: Handling Exceptions occuring in the file  https://review.openstack.org/55528112:29
*** jiangyuan has quit IRC12:43
openstackgerritHunt Xu proposed openstack/qinling master: add missing unit tests for methods of function controller  https://review.openstack.org/55528612:56
openstackgerritHunt Xu proposed openstack/qinling master: add missing unit tests for methods of function controller  https://review.openstack.org/55528613:14
openstackgerritHunt Xu proposed openstack/qinling master: add missing unit tests for methods of function controller  https://review.openstack.org/55528613:54
openstackgerritHunt Xu proposed openstack/python-qinlingclient master: Add commands to scale up/down function workers  https://review.openstack.org/55531614:14
*** huntxu has quit IRC14:18
openstackgerritNeerja Narayan proposed openstack/python-qinlingclient master: Adding test cases to Python-Qinling Client  https://review.openstack.org/55532014:29
openstackgerritNeerja Narayan proposed openstack/python-qinlingclient master: Adding test cases to Python-Qinling Client  https://review.openstack.org/55532014:32
openstackgerritNeerja Narayan proposed openstack/python-qinlingclient master: Improve the support for Qinling Current/Future Versions  https://review.openstack.org/55532314:41
*** rbrady is now known as rbrady-afk16:00
openstackgerritNeerja Narayan proposed openstack/python-qinlingclient master: Adding test cases to Python-Qinling Client  https://review.openstack.org/55532016:04
*** rbrady-afk is now known as rbrady18:49
openstackgerritLingxian Kong proposed openstack/qinling master: Add specs folder for Qinling  https://review.openstack.org/55514021:22
openstackgerritMerged openstack/qinling master: Exclude tests and db migrations from coverage report  https://review.openstack.org/55480221:39
openstackgerritMerged openstack/qinling master: Add specs folder for Qinling  https://review.openstack.org/55514022:20

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