Fave Programming Technique Of The Day
-
cheers, Chris Maunder The Code Project | Co-founder Microsoft C++ MVP
-
cheers, Chris Maunder The Code Project | Co-founder Microsoft C++ MVP
-
cheers, Chris Maunder The Code Project | Co-founder Microsoft C++ MVP
-
cheers, Chris Maunder The Code Project | Co-founder Microsoft C++ MVP
Its a real PITA in the debugger though.
Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS. "And they, since they Were not the one dead, turned to their affairs" -- Robert Frost
-
cheers, Chris Maunder The Code Project | Co-founder Microsoft C++ MVP
It can be tricky doing something like that on a web server though. If the CPU is under utilized, it can make things faster under light load, but once the number of concurrent requests gets to be around the number of cores, it can actually make things slower as the added context switching becomes an issue.
Curvature of the Mind now with 3D
-
It can be tricky doing something like that on a web server though. If the CPU is under utilized, it can make things faster under light load, but once the number of concurrent requests gets to be around the number of cores, it can actually make things slower as the added context switching becomes an issue.
Curvature of the Mind now with 3D
-
Just a quick question Andy, why is this more of a problem for web servers?
"I have a theory that the truth is never told during the nine-to-five hours. " — Hunter S. Thompson
By their nature, web servers handle multiple parallel requests already. Adding extra parallelization on top of that is just wasteful and adds nothing of value.
-
Just a quick question Andy, why is this more of a problem for web servers?
"I have a theory that the truth is never told during the nine-to-five hours. " — Hunter S. Thompson
What aspnetdev said. Parallelizing requests on an already multithreaded server makes sense for special cases, but it can produce worse overall throughput. That's why things like IOCompletion ports that try to keep the number of active threads equal to the number of cores in the system help improve performance. Usually the issue with a web server isn't really processing on the server itself, but waiting on another server on the network. What helps in that case is to do multiple async calls, releasing the current thread to handle another web request while waiting on the backend servers in parallel. That could be done with something that has an interface similar to parallel.for, but the internals would be different.
Curvature of the Mind now with 3D
-
What aspnetdev said. Parallelizing requests on an already multithreaded server makes sense for special cases, but it can produce worse overall throughput. That's why things like IOCompletion ports that try to keep the number of active threads equal to the number of cores in the system help improve performance. Usually the issue with a web server isn't really processing on the server itself, but waiting on another server on the network. What helps in that case is to do multiple async calls, releasing the current thread to handle another web request while waiting on the backend servers in parallel. That could be done with something that has an interface similar to parallel.for, but the internals would be different.
Curvature of the Mind now with 3D
Interesting, when I did performance testing it was the same problems, though we didn't test just web servers. Even our 'client' systems had many concurrent connections, operations, etc. I was curious as to why you called out the case of web servers. Thanks for explaining.
"I have a theory that the truth is never told during the nine-to-five hours. " — Hunter S. Thompson
-
cheers, Chris Maunder The Code Project | Co-founder Microsoft C++ MVP
Looks really good, but have to be used with extreme caution. Same as chili sauce.
There is only one Vera Farmiga and Salma Hayek is her prophet! Advertise here – minimum three posts per day are guaranteed.
-
Interesting, when I did performance testing it was the same problems, though we didn't test just web servers. Even our 'client' systems had many concurrent connections, operations, etc. I was curious as to why you called out the case of web servers. Thanks for explaining.
"I have a theory that the truth is never told during the nine-to-five hours. " — Hunter S. Thompson
wizardzz wrote:
Interesting, when I did performance testing it was the same problems
I'm curious, which problems? Too many concurrent operations, or blocking network connections?
wizardzz wrote:
I was curious as to why you called out the case of web servers.
It might have something to do with who the OP is. ;)
Curvature of the Mind now with 3D
-
wizardzz wrote:
Interesting, when I did performance testing it was the same problems
I'm curious, which problems? Too many concurrent operations, or blocking network connections?
wizardzz wrote:
I was curious as to why you called out the case of web servers.
It might have something to do with who the OP is. ;)
Curvature of the Mind now with 3D
-
cheers, Chris Maunder The Code Project | Co-founder Microsoft C++ MVP
-
cheers, Chris Maunder The Code Project | Co-founder Microsoft C++ MVP