Introduction

kpf is a public fileserver for KDE

Screenshots

kpf undergoes some testing (old)

kpf_applet.png

Download

kpf is now in KDE’s CVS, module kdenetwork, so will be released with KDE 3. If you want an old version (that works with KDE 2.x), try this link.

Warning: If you find the 0.4.2 release anywhere, don’t use it. It has not been audited for security. It was provided here temporarily, for testers to play with. A certain website which shall remain unnamed is still providing the 0.4.2 release, with the package stored at the site. Repeated requests to have the package removed have been met with blank refusal. I will accept no responsibility for problems related to the 0.4.2 release, nor will I answer any questions pertaining to it.

kpf-0.4.tar.gz

Requirements

KDE2

Features

  • Implemented as a basic web server - compatible with wget, links, Konqueror, Netscape Navigator, etc.
  • Bandwidth capping - useful for those on restricted-bandwidth links who want to keep some bandwidth for themselves.
  • Real-time point-and-click interface, featuring bandwidth graph and view of all transfers, with ability to cancel transfers at any time.
  • Persistent connections.
  • HTTP ‘Range’ support for resuming downloads.

Not supported

None of these features will ever be implemented, so don’t ask for them.

  • CGI
  • PUT requests

Notes

Symlinks are not followed by default. You can switch on symlink following in the configuration dialog.

Requests for URLs containing ‘..’ are rejected.

I’m now using kpf as my local web server. I like it because it’s easy to monitor and manage in real time and it doesn’t seem slower than thttpd or publicfile. Benchmarks confirm the perception.

Benchmarks

Benchmarks conducted using Siege with default settings (10 users, 25 times each, delay of 3) using a single URL (index.html from the top of ‘without’)

publicfile and thttpd were tested using their default configurations. kpf is designed to keep the load down on the user’s machine - it’s not supposed to be a fast web server, so I manually removed bandwidth throttling and concurrent connection count limiting from the code to get a better idea of the raw speed.

Server ET DT RT TR TH CO
kpf 61.38 163000 0.05 4.07 2655.59 0.22
publicfile 51.39 178500 0.00 4.86 3473.44 0.20
thttpd 53.34 163000 0.00 4.69 3055.87 0.00
  ET = Elapsed time (seconds)
  DT = Data transferred (bytes)
  RT = Response time (seconds)
  TR = Transaction rate (transactions per second)
  TH = Throughput (bytes per second)
  CO = Concurrency
  

Analysis

It appears that kpf is slightly slower than publicfile and thttpd, but that’s ok. kpf is designed for use on a bandwidth-limited box, so raw speed at maximum load isn’t an issue. I could use sendfile() where it’s supported, plus kqueue on BSD, plus use TCP_CORK on Linux, that kind of thing, but I prefer code that is readable and can be audited and maintained easily to having the world’s fastest web server. Though if the nice people who own Zeus would like to send me a copy...

Testing different usage patterns, i.e. one user, multiple users, different file sizes, it seems that kpf is able to keep the bandwidth nailed almost exactly to the limit set by the user. The bandwidth used never exceeds the maximum and is only ever a couple of percent below the maximum at high load.

TODO

  • Custom error messages.

Anything else you think should be added ?

No comments