Skip to content

Module loading slow on large systems #114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gronke opened this issue Sep 20, 2017 · 4 comments
Closed

Module loading slow on large systems #114

gronke opened this issue Sep 20, 2017 · 4 comments
Labels

Comments

@gronke
Copy link
Member

gronke commented Sep 20, 2017

I've experienced a multiple second delay when importing iocage on a large system. After figuring out the problem exists when loading modules, I've tried to debug and found a few issues in other places reporting similar occasions. Please excuse my debug print outputs here: https://asciinema.org/a/aISpNg4EIb31BS78uMXFBsxFM

Packages that were found to be slow:

  • uuid
  • requests

(After resting a self-written implementation of uuid, the next candidate requests shows up).

See also:

@gronke gronke added the bug label Sep 20, 2017
@gronke
Copy link
Member Author

gronke commented Sep 20, 2017

root@ip-172-31-25-0:~ # /usr/bin/time -l python3.6 -m uuid                                                                               
        0.78 real         0.20 user         0.57 sys                
     14588  maximum resident set size                               
         4  average shared memory size                              
         4  average unshared data size                              
       128  average unshared stack size                             
      4379  page reclaims         
         0  page faults           
         0  swaps                 
         8  block input operations                                  
         0  block output operations                                 
         0  messages sent         
         0  messages received     
         0  signals received      
        31  voluntary context switches                              
         9  involuntary context switches                            
root@ip-172-31-25-0:~ # /usr/bin/time -l python3.6 -m hashlib       
        0.03 real         0.02 user         0.01 sys                
     11928  maximum resident set size                               
         5  average shared memory size                              
         5  average unshared data size                              
       160  average unshared stack size                             
      1267  page reclaims         
         0  page faults           
         0  swaps                 
         0  block input operations                                  
         0  block output operations                                 
         0  messages sent         
         0  messages received     
         0  signals received      
         2  voluntary context switches                              
         2  involuntary context switches

@igalic
Copy link
Collaborator

igalic commented Sep 21, 2017

We now have a fix in cpython itself: python/cpython#3684

@igalic
Copy link
Collaborator

igalic commented Sep 21, 2017

urllib3/urllib3#1270 has been merged!
as soon as they release a new version, we can pin that in our requirements.txt

@gronke
Copy link
Member Author

gronke commented Sep 23, 2017

Will be fixed upstream.

@gronke gronke closed this as completed Sep 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants