*** caoyuan has joined #openstack-qinling | 00:52 | |
*** caoyuan has quit IRC | 01:03 | |
*** huntxu has joined #openstack-qinling | 01:18 | |
*** liusheng has quit IRC | 01:26 | |
*** liusheng has joined #openstack-qinling | 01:27 | |
*** jiangyuan has joined #openstack-qinling | 01:47 | |
jiangyuan | hi, 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-qinling | 02:31 | |
jiangyuan | And 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 |
kong | jiangyuan: 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 change | 02:33 |
kong | https://github.com/openstack/qinling/blob/aa358e5e6689d0843b59b3f30efa2c2b88c55761/runtimes/python2/server.py#L79 | 02:33 |
kong | in user's function they can create extra subprocesses, but can not break the limit for the root process | 02:34 |
kong | so, for package/swift type function, we don't need to define resource limit in pod definition | 02:35 |
kong | for customized resource limitation, we need to pass user's param to the runtime and set resource limit for root process | 02:36 |
kong | because qinling will garantee one pod only mapping to specified number of function invocation, so we don't need to set resource limit for pod | 02:37 |
kong | the 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 pod | 02:40 |
kong | which i need to write something in qinling's doc | 02:40 |
kong | jiangyuan, in other word, you need to customize thing here: https://github.com/openstack/qinling/blob/aa358e5e6689d0843b59b3f30efa2c2b88c55761/runtimes/python2/server.py#L51-L53 | 02:43 |
kong | jiangyuan: btw, understanding more about ulimit usage will help you implement this feature | 02:44 |
jiangyuan | kong: 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 |
kong | jiangyuan: the ulimit will limit the resource uasge in current process *AND* its subprocesses | 02:48 |
kong | for 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 100M | 02:50 |
jiangyuan | Oh, that will be great. | 02:51 |
kong | jiangyuan: do you mind wrting something before you change the code? just like the bp specification as other projects | 02:52 |
kong | so we could reveiw the whole idea before you waste time on the implemenation that could change a lot as review goes on | 02:53 |
jiangyuan | by the way, the resource.RLIMIT_CPU is about seconds, I wonder if we can use cpu param and timeout param to generate the value | 02:53 |
jiangyuan | OK | 02:53 |
kong | jiangyuan: so can you create a new folder called 'spec' under 'doc/source' folder and create a new file in the formatting of openstack spec doc | 02:55 |
jiangyuan | OK, | 02:56 |
kong | jiangyuan: just write your basic idea is ok, including the problem you are aiming to solve, the api change and the rough implemenation detail | 02:58 |
kong | jiangyuan: do you need me to create a spec template first | 02:59 |
kong | so you can write your own accordingly | 02:59 |
jiangyuan | kong: That will be greate! | 02:59 |
kong | ok | 02:59 |
jiangyuan | thans a lot | 03:00 |
openstackgerrit | Lingxian Kong proposed openstack/qinling master: Add specs folder for Qinling https://review.openstack.org/555140 | 03:21 |
kong | jiangyuan: fyi | 03:21 |
kong | huntxu: when you are here, please review https://review.openstack.org/555140 | 03:22 |
kong | aftger its merge, jiangyuan could start his feature description there and we could track our discussion in gerrit | 03:22 |
jiangyuan | I have been busy with graduation design recently ,so it may be updated a little later | 03:27 |
kong | jiangyuan: that's ok, let me know if you have any problems with this | 03:27 |
jiangyuan | But I will do it as soon as possible | 03:28 |
kong | jiangyuan: cool, thanks | 03:28 |
openstackgerrit | Lingxian Kong proposed openstack/qinling master: Add specs folder for Qinling https://review.openstack.org/555140 | 04:48 |
huntxu | kong: 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 process | 06:10 |
huntxu | jiangyuan: kong I created a PoC script to verify this https://paste.ubuntu.com/p/sKdP3VgJtM/ | 06:10 |
huntxu | I 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 respectively | 06:11 |
huntxu | jiangyuan: 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 limit | 06:15 |
*** jiangyuan has quit IRC | 07:12 | |
*** jiangyuan has joined #openstack-qinling | 07:27 | |
jiangyuan | huntxu: 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 |
jiangyuan | huntxu: for VSZ & RSS, you mean that RSS will affect VSZ? | 09:22 |
*** jiangyuan has quit IRC | 09:22 | |
*** jiangyuan has joined #openstack-qinling | 09:22 | |
huntxu | jiangyuan: without swapping, RSS & VSZ both include stack & heap memory IIUC | 09:29 |
huntxu | jiangyuan: you can refer to https://stackoverflow.com/questions/7880784/what-is-rss-and-vsz-in-linux-memory-management | 09:32 |
openstackgerrit | Neerja Narayan proposed openstack/qinling master: Removed extra underscore in tempest unit tests https://review.openstack.org/555214 | 09:33 |
*** caoyuan has quit IRC | 09:59 | |
openstackgerrit | OpenStack Proposal Bot proposed openstack/qinling master: Updated from global requirements https://review.openstack.org/555236 | 10:09 |
*** Neerja has joined #openstack-qinling | 10:50 | |
Neerja | Hi, 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 |
Neerja | Thank you :) | 10:54 |
openstackgerrit | Merged openstack/qinling master: Updated from global requirements https://review.openstack.org/555236 | 10:59 |
jiangyuan | huntxu: 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 |
jiangyuan | huntxu: And before running the function, the process will occupy some of the memory | 12:00 |
*** rbrady-afk is now known as rbrady | 12:13 | |
jiangyuan | So, 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 use | 12:13 |
openstackgerrit | Neerja Narayan proposed openstack/python-qinlingclient master: Handling Exceptions occuring in the file https://review.openstack.org/555281 | 12:29 |
*** jiangyuan has quit IRC | 12:43 | |
openstackgerrit | Hunt Xu proposed openstack/qinling master: add missing unit tests for methods of function controller https://review.openstack.org/555286 | 12:56 |
openstackgerrit | Hunt Xu proposed openstack/qinling master: add missing unit tests for methods of function controller https://review.openstack.org/555286 | 13:14 |
openstackgerrit | Hunt Xu proposed openstack/qinling master: add missing unit tests for methods of function controller https://review.openstack.org/555286 | 13:54 |
openstackgerrit | Hunt Xu proposed openstack/python-qinlingclient master: Add commands to scale up/down function workers https://review.openstack.org/555316 | 14:14 |
*** huntxu has quit IRC | 14:18 | |
openstackgerrit | Neerja Narayan proposed openstack/python-qinlingclient master: Adding test cases to Python-Qinling Client https://review.openstack.org/555320 | 14:29 |
openstackgerrit | Neerja Narayan proposed openstack/python-qinlingclient master: Adding test cases to Python-Qinling Client https://review.openstack.org/555320 | 14:32 |
openstackgerrit | Neerja Narayan proposed openstack/python-qinlingclient master: Improve the support for Qinling Current/Future Versions https://review.openstack.org/555323 | 14:41 |
*** rbrady is now known as rbrady-afk | 16:00 | |
openstackgerrit | Neerja Narayan proposed openstack/python-qinlingclient master: Adding test cases to Python-Qinling Client https://review.openstack.org/555320 | 16:04 |
*** rbrady-afk is now known as rbrady | 18:49 | |
openstackgerrit | Lingxian Kong proposed openstack/qinling master: Add specs folder for Qinling https://review.openstack.org/555140 | 21:22 |
openstackgerrit | Merged openstack/qinling master: Exclude tests and db migrations from coverage report https://review.openstack.org/554802 | 21:39 |
openstackgerrit | Merged openstack/qinling master: Add specs folder for Qinling https://review.openstack.org/555140 | 22:20 |
Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!