IT Hare on Soft.ware

Tap to confirm selection


Your mileage may vary. Batteries not included

Assorted Rants Tagged ‘Multithreading’, page 1/2 :

#CPPCON2017. Day 4. Async Rulezzz!

During the Day 4 of CPPCON, I had to prepare to my own talk tomorrow; still – I was able to attend all the talks I was interested in. But before I can start – let’s discuss a thing which I just understood during CPPCON17; it is related to… Big Fallacies of Parallel Programming for Joe Average Developer Twice today, I heard pretty much the same thing, related to the concept of “utilization” of the available CPU cores. And the most funny about it was that while once, a reference to “core utilization” felt as a fallacy, on another occurrence it…

#CPPCON2017. Day 2. Why Local Allocators are a Good Thing(tm) Performance-Wise, and Why I am Very Cautious about C++17 STL parallelized algos

At CPPCON2017 Day 2, two talks were of special interest to me. One was a 2-hour talk about Local Allocators – and another about C++17 STL parallelised algorithms. Local Allocators The talk on Local Allocator by John Lakos was brilliant both in terms of content and in terms of presentation (I wish I’d be able to speak as convincingly as him some day <sigh />). I highly recommend all the performance-conscious C++ developers to watch his talk as soon as it is becomes available on the Youtube. Very very shortly: using local allocators can easily improve performance by a factor of 10x It doesn’t matter…

Allocator for (Re)Actors with Optional Kinda-Safety and Relocation

“‘Safe with relocation’ mode will allow us to eliminate dreaded ‘external fragmentation’ – which tends to cause quite a bit of trouble for long-running systems”
Another Quote:
“For a long while, I have been a strong proponent of message-passing mechanisms over mutex-based thread sync for concurrency purposes”

Implementing Queues for Event-Driven Programs

“full queues SHOULD NOT happen during normal operation”
Another Quote:
“With queues-implemented-over-mutexes like the ones we’ve written above, the most annoying thing performance-wise is that there is a chance that the OS’s scheduler can force the preemptive context switch right when the thread-being-preempted-is-owning-our-mutex.”

Network Programming: Socket Peculiarities, Threads, and Testing

“I am not saying that this architecture is the only viable one, but it does work for TCP for sure (and performs reasonably well too)”
Another Quote:
“The whole task of optimizing performance beyond, say, 20-50K packets/second per box tends to be Quite Elaborated, and involves quite a few things which are platform- and hardware-dependent.”

Server-Side MMO Architecture. Naïve, Web-Based, and Classical Deployment Architectures

“If you disrupt the game-event-currently-in-progress for more than 0.5-2 minutes, for almost-any synchronous multi-player game you won’t be able to get the same players back, and will need to rollback the game event anyway.”
Another Quote:
“However, keep in mind, that all fall-tolerant solutions are complicated, costly, and for the games realm I generally consider them as an over-engineering (even by my standards).”