[patch] kioslave performance issues, dramatic improvement for ftp

Dr. Juergen Pfennig info at j-pfennig.de
Wed Feb 11 11:25:30 GMT 2004


Hi KDE Developers,
maybe I am stupid - but there are performance problems in some kioslaves that 
could be easily fixed. The attached demo-patch dramatically improves "get" 
for the ftp kio slave.

The problem:
   I needed at least a P4 2.6 GHz machine to reach a ftp download rate of 10.5 
MB/s in a 100 Mbit/s network. On a P4 2.4 Celeron the download rate broke 
down to 3.8 MB/s while the CPU was 100% busy!

The patch:
  Now the P4 Celeron 2.4 reaches the full 11 MB/s and the CPU still is 30% 
idle. On the P4 2.6 machine the speed went up by 5% (11 MB/s now) and the CPU 
load is down to 30% (after 95% unpatched).

Explanation:
   Except "file" no kio slave seems to implement the "copy" method. The "ftp" 
slave contained the comment "as far as I know this is not implemented". But 
it is (see patch) and it works!
   Also some slaves use quite small buffers for inter-process-communication. 
The patch introduces a dynamic buffer size for ftp now. This alone increased 
the speed in the P4 Celeron case from 3.8 MB/s to 8.2 MB/s.

Question:
  This patch is more a demo (although I would recommend to backport it to KDE 
3.2 soon). What about applying similar changes to other kio slaves? I would 
also suggest little enhancements to KIO (maybe for KDE 4).

Yours Jürgen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ftp.diff
Type: text/x-diff
Size: 6327 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040211/a5365ecb/attachment.diff>


More information about the kde-core-devel mailing list