Re: [Cppcms-users] Idle time in handling post requests
Brought to you by:
artyom-beilis
|
From: Dr. P. G. <pet...@si...> - 2014-11-20 15:02:33
|
Thank you Artyom for you quick reply.
The answers to your questions are below. I really appreciate your help.
Best Regards,
Peter
Am 20.11.2014 um 15:02 schrieb Artyom Beilis:
> Hi,
>
> - What CppCMS version are you working with?
1.0.4 (#define CPPCMS_PACKAGE_STRING "CppCMS/1.0.4")
> - How do you POST the XML data: multipart/form-data or urlencoded?
#!/bin/tcsh
foreach f ( `ls xml-data/*.xml` )
curl -X POST http://localhost:8889 -Hcontent-type:application/xml
-d @$f # cppcms
end
the files are copied from boost: cp `find .../boost_1_53_0 -name "*.xml"
-size +8k -size -10k` ../curl/xml-data/
> - Do you use an external web server or internal cppcms web server?
localhost, see also config
> - Can you show the full code/configuration?
Sure. Attached. I tried a synchronous and an asynchronous request
handler but the performance was the same.
>
> Measuring the "client user time" is useless you need to see what
> happens on the server side.
Now that you mention that... Never mind.
>
> Small notes:
> - since *1.0.5* there was a significant fix in upload times of
> multipart/form-data but what you show (10 s) it does not look like
> the case
Well, then I will try a newer version. Just in case.
> - When uploading files starting from some size the files go to disk
> rather than to the memory:
> http://cppcms.com/wikipp/en/page/cppcms_1x_config#security.file_in_memory_limit
> However the default limit is around 128k... so does not look like your
> case.
>
> Artyom Beilis
> --------------
> CppCMS - C++ Web Framework: http://cppcms.com/
> CppDB - C++ SQL Connectivity: http://cppcms.com/sql/cppdb/
>
> ------------------------------------------------------------------------
> *From:* Dr. Peter Gottschling <pet...@si...>
> *To:* CppCMS mailing list <cpp...@li...>
> *Sent:* Thursday, November 20, 2014 3:13 PM
> *Subject:* [Cppcms-users] Idle time in handling post requests
>
> Hi,
>
> We are using a CppCMS server and its performance is very low for
> post requests when the post messages reach a certain size of some
> kB. This already happens with minimal server examples from the
> beginners tutorial.
> The weird thing is that the server spends only 6 milliseconds in
> the main function (in total) but one or two seconds between two
> calls.
>
> 1. What is CppCMS doing in this time?
> 2. And more importantly, how can this time be shortened?
> 3. Is it an issue of the thread pool?
> 4. Is there some expensive treatment for the post messages? (I
> read something about compression) Can it be turned off or
> accelerated? Post requests with small data did not show these
> idle phases.
>
> 9 post requests with XML files between 8 and 10kB took 10 seconds
> wall clock time without even treating the requests. The user time
> was only 45ms.
> The same post requests take less than half a second with a
> similarly minimalistic node.js server. I tried different
> configurations and read a lot of dox and posts put couldn't find
> something that explains these long idle times. Any help is
> welcome. I can send the code and the configurations if this helps.
> Thank you in advance,
> Peter
> ---
> curl> time post_xml_files.sh
> Hello from CppCMS after 0.000135s
> Hello from CppCMS after 0.00111s
> Hello from CppCMS after 0.001995s
> Hello from CppCMS after 0.002756s
> Hello from CppCMS after 0.00354s
> Hello from CppCMS after 0.004228s
> Hello from CppCMS after 0.004865s
> Hello from CppCMS after 0.005481s
> Hello from CppCMS after 0.006174s
>
> real 0m10.154s
> user 0m0.046s
> sys 0m0.064s
>
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and
> Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration
> & more
> Get technology previously reserved for billion-dollar
> corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
> _______________________________________________
> Cppcms-users mailing list
> Cpp...@li...
> <mailto:Cpp...@li...>
> https://lists.sourceforge.net/lists/listinfo/cppcms-users
>
>
>
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
>
>
> _______________________________________________
> Cppcms-users mailing list
> Cpp...@li...
> https://lists.sourceforge.net/lists/listinfo/cppcms-users
|