Overview
Features
Download
Documentation
Community
Add-Ons & Services

POCO Socket performance using HTTP

Please post support and help requests here.

POCO Socket performance using HTTP

Postby fbeyer » 31 Mar 2008, 22:27

In a client/server-architecture I am using Poco's HTTPClient and -Server classes and the StreamCopier for data transfer. Unfortunately the performance is very disappointing -- about 200 KB/sec on the local LAN. Since I have little experience with network programming, I have no glue where to look for optimizations.

Has anyone made similar experiences or some hints to improve this?

Thanks in advance!
F.
fbeyer
 
Posts: 1
Joined: 04 Dec 2007, 11:20
Location: Germany

Re: POCO Socket performance using HTTP

Postby peter » 03 Apr 2008, 13:14

> In a client/server-architecture I am using Poco's HTTPClient and -Server classes and the StreamCopier for data transfer. Unfortunately the performance is very disappointing -- about 200 KB/sec on the local LAN. Since I have little experience with network programming, I have no glue where to look for optimizations.
>
> Has anyone made similar experiences or some hints to improve this?


Hmm,

I just tested with a modified Net/download simple, easily get 5MByte/seconds via localhost.
I doubt the bottleneck is from the StreamCopier, what is the CPU load on server and on client? If it is low, it's probably some threading issue. Replace your HTTPClient with a modified download sample that writes the file to a NullOutputStream, measure.
Then replace the HTTPServer with apache and measure again. This should help you to narrow the cause to the server/client side.

Just make sure to use HTTP1.1 and to use keepAlive (though this shouldn't be an issue with one single connection, just when you have lots of connections being established between the same server and client). Also if the file is small (lets say less than 1 MByte), there is an overhead for creating the HTTPConnection.

You are working over 100Mbit LAN, not wireless?

br

Peter
>
> Thanks in advance!
> F.
peter
 
Posts: 67
Joined: 11 Jul 2006, 16:26
Location: Austria


Return to Support

Who is online

Users browsing this forum: No registered users and 4 guests

cron