Follow-up Comment #4, bug #100605 (project xrootd):
The issue has been understood. It comes from three places:
1) XrdCl::URL::GetHostId() and XrdCl::URL::GetURL() which are called
thousands of times, for host identification and debugging, and actually
construct what they need to return every time using std::ostringstream, which
is pathologically slow. This can easily be eliminated.
2) Debugging messages. They take a significant amount of CPU to be produced.
They will be redone using macros for better performance.
3) Memcpy, see attached image.
]==> time ./a.out root://eosdevsrv1.cern.ch//eos/dev/2rep/1G old 33554432 100
&& time ./a.out root://eosdevsrv1.cern.ch//eos/dev/2rep/1G new 33554432 100
[i] Running old client for block size: 33554432, number of reads: 100, file:
root://eosdevsrv1.cern.ch//eos/dev/2rep/1G
[i] Total time: 30.838047
[i] Reqs/sec: 3.24275
./a.out root://eosdevsrv1.cern.ch//eos/dev/2rep/1G old 33554432 100 1.02s
user 7.24s system 26% cpu 30.842 total
[i] Running new client for block size: 33554432, number of reads: 100, file:
root://eosdevsrv1.cern.ch//eos/dev/2rep/1G
[i] Total time: 32.417646
[i] Reqs/sec: 3.08474
./a.out root://eosdevsrv1.cern.ch//eos/dev/2rep/1G new 33554432 100 3.42s
user 8.79s system 37% cpu 32.422 total
The new client takes 3.4 seconds of user time, comparing to 1 second for
the old client, and this is roughly the difference in the real time. As the
profiler shows 82% of this user time is spent doing memcpy. This wouldn't be
a problem if it was not being done in the polling thread and thus blocking
the data transfer. It will be fixed in 3.3.2.
_______________________________________________________
Reply to this item at:
<http://savannah.cern.ch/bugs/?100605>
_______________________________________________
Message sent via/by LCG Savannah
http://savannah.cern.ch/
########################################################################
Use REPLY-ALL to reply to list
To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1
|