Menu

IT Hare on Soft.ware

Tap to confirm selection

Subscribe:

Your mileage may vary. Batteries not included

Premature and/or over-optimization is often claimed to be a root of most evil in the programming world. However, what to do when optimization IS neccessary?

IT Hares discuss certain not-so-trivial optimization techniques. It doesn’t mean that you should use them at all costs (and most likely, you don’t); however, if you do have a reason to optimize – this information may be handy.

Optimizations, page 1/3 :


OLTP Database Optimization 102 – DIY Heterogeneous Replication (Part II)

Quote:
“The point of Super-Replica is that it is a replica Slave DB which is larger than original Master DB”
Another Quote:
“this “don’t write some HISTORICAL data to Master DB” approach can easily allow to reduce the load on the Master OLTP DB by a factor of 2x-3x”

OLTP Optimization 102: DYI Heterogeneous Replication. Part I (Basics)

Quote:
“there are still several Big Fat Reasons™ to use DIY replicas”
Another Quote:
“With the Replication Messages described above, it is ok to apply Replication Messages to Slave DB which is newer than exactly necessary.”

OLTP DB Optimizations 102 – Group Commits

Quote:
“if we can commit several transactions at the same time – RDBMS needs to fsync() our DB logs to physical disks only once”
Another Quote:
“if going our preferred way of single-writing-DB connection – make sure NOT to use RDBMS-level Group Commit”

OLTP DB Optimizations 102 –100% Coherent App-Level Cache for Single-writing-DB-connection

Quote:
“with our app-level cache, we’re guaranteed to get exactly the same results as if we’d be querying the underlying database.”
Another Quote:
“why settle for invalidation when we can modify cache accordingly, saving on the extra DB request when we’re dealing with the same USER again?”

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

Quote:
“‘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”