Comments (4)
The problem is caused by the concurrency runtime.
Add preprocessor definition CPPREST_FORCE_PPLX and recompile the library and the programs then the problem is gone.
from cpprestsdk.
Surely though having to force pplx is a bug? There shouldn't be a memory
leak in either runtime?
Sent from my Nexus 5.
On 4 Jan 2016 2:43 a.m., "wdx04" [email protected] wrote:
—
Reply to this email directly or view it on GitHub
#46 (comment).
from cpprestsdk.
From the blog article http://ib-krajewski.blogspot.hk/2015/09/casablanca-c-rest-framework-one-year.html
-
The only really big problem that hit us was the performance. The troublewas, that after a couple of thousands of file uploads or downloads, server performance tumbled into a free fall: the same basic polling which normally had taken 2-3% of the CPU time surged to 20-30% after that! That was a real show stopper at first. And of course it wasn't our code that showed up in the profiler, it was some of Casablanca internals!
It took me about 2 weeks to investigate that, and maybe I'll write a more detailed post about it some time, but for now it suffices to say that Windows Concurrency Runtime (i.e. the native, task-based implementation of PPL) was left with an ever-growing internal list, which was sequentially scanned with each tick of the scheduler - at least in our environment of Windows 7 and Visual Studio 2013 plus an early Casablanca version (1.2.0).
I reported it to Microsoft, and they reacted pretty quickly - the next release has been given a define (CPPREST_FORCE_PPLX) to disable Concurrency Runtime and switch over to Windows Threadpool based implementation of PPL. I got the latest version from the development branch, tested it, and voila! our performance problems vanished into thin air. We then waited for the next release (2.5.0) and when it came out, we upgraded our code to it and suddenly everything worked like a charm. BTW, for the Casablanca version for Visual Studio 2015 Windows Threadpool is the default setting (or so I was told)**.
from cpprestsdk.
I noticed the problem of the high CPU load also with Websockets on Win32 (and VS2013), and the CPPREST_FORCE_PPLX symbol helps.
But I have a question: Does switching to Windows Threadpool have any disadvantage compared to Concurrency Runtime? Is there a reason the symbol isn't set by default?
from cpprestsdk.
Related Issues (20)
- How to set timeout for the socket connection HOT 1
- Periodic drop in throughput in inter-(linux N/W namespace) communications HOT 1
- Static version of the nugget for Visual Studio Express 2013 for Windows Desktop
- The web_proxy doesn't work when set proxy with uri
- Charset support gbk...
- utility::details::str_iless(str1, str2);
- [MSVC] websocketsclient_test failed due to CHECK_EQUAL(ret_msg.length(), body_str.length()) where ret_msg.length()=32 and body_str.length()=5 HOT 1
- ../lib/libstdc++.so.6: version `GLIBCXX_3.4.30' not found HOT 2
- async http client post/get request demo?
- nable to add both a file stream and key-value pairs to the body of the request simultaneously
- error: building cpprestsdk:x64-linux failed with: BUILD_FAILED HOT 3
- [http_client] CN checking against caller-specified Host header doesn't strip a port number
- using cpprest and segmentation fault on ubuntu 22.04 HOT 4
- hey dont worry about
- Need to double confirm if cpprestsdk supports HTTP proxy server secured by TLS
- vcpkg install should deploy ThirdPartyNotices.txt
- Build failed on Ubuntu HOT 2
- Running the example bingrequest.cpp resulted in a crash. HOT 2
- Build fails not finding openssl on GitHub MacOS runner
- 70+ Issues when building? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cpprestsdk.