taucmdr icon indicating copy to clipboard operation
taucmdr copied to clipboard

Python's tarfile package is S-L-O-W

Open jlinford opened this issue 8 years ago • 3 comments

tau trial export for a trace creates a compressed tarball, but it's about 10x slower than using the system's tar cvzf. We should invoke tar when available and fallback to Python's tarfile package otherwise. We do something similar for curl and wget in util.download()

jlinford avatar Nov 01 '17 20:11 jlinford

Some numbers:

1.9GB trace:

[TAU] Writing '/work1/people/jlinford/NEPTUNE/NEP-117/knl01-neptune_fcst-trace.trial0.tgz'...
[TAU] Completed in 990.592 seconds

vs.

time tar czf ~/0.tgz 0

real	1m10.381s
user	1m9.313s
sys	0m1.575s

So really Python's tarfile module is about 14x slower than the system tar command. Yikes!

jlinford avatar Nov 01 '17 20:11 jlinford

Could the -u flag added to resolve Issue #136 be causing this?

jlinford avatar Nov 13 '17 16:11 jlinford

Very very possible. The question is did you run tests before or after I added it? Maybe there is a better way to control IO to stdout/stderr than setting -upon the command line. I’ll investigate.

zbeekman avatar Nov 14 '17 05:11 zbeekman