Hello, I've tried searching the archives without much luck, so here goes... I'm using version 1.37 of the boost libraries and I've implemented a SCGI, http://python.ca/scgi/protocol.txt http://python.ca/scgi/protocol.txt , server using the HTTP Server 3 as a starting point. Everything works fine for small requests ~1k, but when I try to send ~10 Mb through the performance is awful. It takes ~90 seconds to transfer the data locally on my pc from one app to another. I've tried profiling the code assuming that I was wasting time somewhere in my code, but the profiler should that the threads that were processing the requests where blocked most of the time and not doing anything. The buffer size that I use to read with is 128kb. I not sure what other information is helpful to diagnose what I'm doing wrong. Any help would be appreciated. Regards, Daniel Perry
Not easily, The application with the trouble is a windows service that sits behind a lighttpd server. The client app is an exe that uses the libcurl library to send the data. I'm on windows BTW. Perhaps I could start with the http server 3 and implement a http put method, I'll see the feasibility of that. Dan -----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Igor R Sent: Wednesday, August 26, 2009 10:31 AM To: boost-users@lists.boost.org Subject: Re: [Boost-users] [asio] poor read performance with 10Mb
when I try to send ~10 Mb through the performance is awful. It takes ~90 seconds to transfer the data locally on my pc from one app to another.
Could you attach a minimal program that illustrates the above statement? _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Not easily,
The application with the trouble is a windows service that sits behind a lighttpd server. The client app is an exe that uses the libcurl library to send the data. I'm on windows BTW.
Perhaps I could start with the http server 3 and implement a http put method, I'll see the feasibility of that.
If I got you right, you say that reading a big file and sending it to a socket - by means of ASIO - takes a lot of time. This's unreleated to any other functionality - http or win.service - and could be easily isolated and reproduced in a few lines of code...
The problem is reading a large file from a socket, not writing to. I'm going to modify the http server 3 to support http put and see if I can duplicate the problem with that. -----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Igor R Sent: Wednesday, August 26, 2009 10:48 AM To: boost-users@lists.boost.org Subject: Re: [Boost-users] [asio] poor read performance with 10Mb
Not easily,
The application with the trouble is a windows service that sits behind a lighttpd server. The client app is an exe that uses the libcurl library to send the data. I'm on windows BTW.
Perhaps I could start with the http server 3 and implement a http put method, I'll see the feasibility of that.
If I got you right, you say that reading a big file and sending it to a socket - by means of ASIO - takes a lot of time. This's unreleated to any other functionality - http or win.service - and could be easily isolated and reproduced in a few lines of code... _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Not easily,
The application with the trouble is a windows service that sits behind a lighttpd server. The client app is an exe that uses the libcurl library to send the data. I'm on windows BTW.
Perhaps I could start with the http server 3 and implement a http put method, I'll see the feasibility of that.
If I got you right, you say that reading a big file and sending it to a socket - by means of ASIO - takes a lot of time. This's unreleated to any other functionality - http or win.service - and could be easily isolated and reproduced in a few lines of code...
Okay, I create an app that seems to reproduce the problem. I used cURL to upload a file to lighttpd using HTTP PUT and to the app. Both servers are running locally on my machine: Lighttpd: C:\Program Files\cURL>curl -T "c:\Workspace\_debug\sqlite3.lib" -H "Expect:" localhost:81/dav/test.bin % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 9931k 0 0 100 9931k 0 12.9M --:--:-- --:--:-- --:--:-- 13.1M Test app based on HTTP server 3 example: C:\Program Files\cURL>curl -T "c:\Workspace\_debug\sqlite3.lib" localhost:82/test.bin % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 9931k 0 0 100 9931k 0 475k 0:00:20 0:00:20 --:--:-- 479k I was running the test app on port 82 with 3 threads Now the lighttpd server is a port using cygwin, so it's probably not using I/O completion ports but winsock stuff under the covers but it still beats the pants off the example app. So I'm open to suggestions on what to change to make this work. I need to be able to transfer 4+GB files, and 479k/s is un-acceptably slow. Thanks, Daniel
participants (2)
-
Igor R
-
Perry, Daniel