@gwenshap I'll counter the "containers are a mature technology" with Linux is still incapable of returning ENOMEM for hitting the memory limit in a container.
Swapping out all application binaries before OOM killing the database is not nice.
@BenjDicken@eatonphil It's not the eviction algorithm that makes the OS cache necessary. Usage counts in Clock and ring buffer based eviction for scans gives equal or better scan protection. OS provides scan detection and readahead and write buffering for PostgreSQL. AIO will enable direct IO soon.
@jorandirkgreef Memory accesses are interleaved with useful work, giving better average core utilization for the same amount of memory bandwidth. And by memory bandwidth I mean core bandwidth to L3/DRAM bus as that is the typical bottleneck for highly tuned code.
The Trump-Putin Pact already exists, and we should act accordingly. There are some things we will never change with nice words or smart clothing. If you are worried about those things, you should understand where Trump's tactics come from. From Russia.
A thread. 🧵1/14
@brandur In a similar vein, when talking about performing aggregate counts with inverted indexes and bitmaps I like to point out that during a single RAM access a CPU can intersect about 100'000 bits. Modern software performance is all about data locality.
@FranckPachot Better to use low tcp keepalive to detect dead components. When looped retrying on a flipped plan it's pretty easy to make a bad situation worse and block out any still working traffic. Per feature circuit breakers help.
New fully inclusive #Patroni@PostgreSQL#HA major release v4.0.0. Includes amazing features like: Quorum based failover, enchanted Citus support and Configurable retention of replication slots for members: https://t.co/PJXd6xUIaH
cc:@hugh_capet@AntsAasma@IsraelBarthRubi 🐘🐘🐘
@surrealjones@apenwarr You can get a Nema 6-15 to Schuko adapter for $9 off of Amazon and run any European appliance that doesn't care about line frequency.
@fredine Similar, but not same. I had master process read into a ringbuffer, identify record boundaries and stick them into work queue, workers grab records from the queue/ringbuffer and process. Ringbuffer access will likely be cache-to-cache. Synchronization is tricky though.
@eatonphil Lock free datastructures still use synchronization, it's just hidden behind the CPU ISA. But all abstractions are leaky when performance is concerned, this synchronization is not free. Add enough contention and the workload will be bogged down by cache line bouncing.
@lukaseder@asm0di0 Lazy loading on by default was a mistake. As was automatically registering dirty objects to a Unit of Work. Both lead to hard to review spooky action at a distance of database interactions happening implicitly and potentially far away from the causing call stack.
@samokhvalov@michaelpq@PostgreSQL@postgres_ai Split pgss counters and mutex on contention into a secondary array sharded by getcpu or pid, aggregate on read, merge back on eviction from secondary array.
@houlihan_rick@FranckPachot@MongoDB @MarkCallaghanDB Your code for PostgreSQL spends 83% of time in JSONObject.toString() which I would argue is not really comparing database performance.
@BonesMoses That was a trick question. As far as I can tell, there is no way to have Linux tell you that you can't allocate any more memory in a container. Means pg would have to keep track of all allocations. And if it fails at that, the only option is unusable slowness followed by death.