Skip to content
Snippets Groups Projects
  1. May 23, 2012
  2. Mar 28, 2012
  3. Dec 21, 2011
  4. Nov 17, 2011
  5. Aug 30, 2011
  6. Aug 25, 2011
  7. Aug 19, 2011
  8. Aug 05, 2011
  9. Aug 04, 2011
  10. Mar 24, 2011
  11. Jan 06, 2011
  12. Dec 16, 2010
    • Michael Hanselmann's avatar
      ensure-dirs: Speed up when using big queues · 196d70fa
      Michael Hanselmann authored
      
      The “ensure-dirs” script as included in Ganeti 2.3 is very slow when
      working with big queues requiring a change of permissions on many or all
      files.
      
      $ find /var/lib/ganeti/queue/ | wc -l
      52354
      
      Before this change:
      $ time /usr/local/lib/ganeti/ensure-dirs -f
      real    16m4.739s
      
      While not adressed in this patch, I'd like to record the overall
      ineffiency of the “ensure-dirs” script, even after this change:
      
      $ time /usr/local/lib/ganeti/ensure-dirs -f
      real    5m57.362s
      […]
      $ strace -e clone,execve -f -c /usr/local/lib/ganeti/ensure-dirs -f
      % time     seconds  usecs/call     calls    errors syscall
      ------ ----------- ----------- --------- --------- ----------------
       50.08    5.147090          49    104774           clone
       49.92    5.131094          49    104739           execve
      
      More changes will be needed. Just for comparision, a small Python
      snippet changing permissions on all files (“ensure-dirs” changes the
      owner too):
      
      $ time python -c 'import os; from ganeti import utils;
      [os.chmod(i, 0644) for i in
      utils.ListVisibleFiles("/var/lib/ganeti/queue/archive/big")]'
      real    0m0.605s
      […]
      
      Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
      Reviewed-by: default avatarIustin Pop <iustin@google.com>
      196d70fa
  13. Nov 29, 2010
  14. Nov 19, 2010
  15. Nov 16, 2010
  16. Oct 29, 2010
  17. Oct 28, 2010
  18. Oct 26, 2010
  19. Oct 14, 2010
  20. Oct 13, 2010
  21. Oct 07, 2010
  22. Sep 24, 2010
  23. Sep 13, 2010
  24. Sep 10, 2010
  25. Sep 07, 2010
  26. Sep 06, 2010
Loading