Message308924
Recently we update our environment from Python2.7.5 to Python2.7.13. Then one process's CPU usage grow from 15% to 70%. The cause is urllib.proxy_bypass_environment, the commit I wrote in #26864. Our environments get a no_proxy environment variable which contains 4000+ items. See the performance difference:
cascading-controller:~ # time python2 -c 'import urllib; urllib.proxy_bypass_environment("1.1.1.1")'
real 0m1.134s
user 0m1.126s
sys 0m0.007s
cascading-controller:~ # time python2 -c 'import urllib; urllib.proxy_bypass_environment("1.1.1.1")'
real 0m0.037s
user 0m0.024s
sys 0m0.013s
Temporarily I increased regex cache size to 6000 and the CPU usage and time return to a reasonable range. |
|
| Date |
User |
Action |
Args |
| 2017-12-22 06:14:05 | xiang.zhang | set | recipients:
+ xiang.zhang |
| 2017-12-22 06:14:04 | xiang.zhang | set | messageid: <1513923244.99.0.213398074469.issue32408@psf.upfronthosting.co.za> |
| 2017-12-22 06:14:04 | xiang.zhang | link | issue32408 messages |
| 2017-12-22 06:14:04 | xiang.zhang | create | |
|