PostgreSQL reconsiders its process-based model
PostgreSQL reconsiders its process-based model
Posted Jun 20, 2023 21:19 UTC (Tue) by andresfreund (subscriber, #69562)In reply to: PostgreSQL reconsiders its process-based model by mokki
Parent article: PostgreSQL reconsiders its process-based model
I think it's not really an OS issue, but a hardware one. To avoid having to flush the TLB during context switches linux uses PCIDs on x86-64. During context switches the current the current logical cpu's pcid is updated to the the PCID of the relevant process. But a logical CPU just has a single "active" PCID. I think it's similar on ARM.
But this is a bit outside the area I normally dabble in, so I might be misunderstanding. Or just not know about some newer hardware features linux could utilize.
> For example, would something like opt-in sharing of pages between processes that oracle has been trying to get into kernel be the correct option: https://lwn.net/ml/linux-kernel/cover.1682453344.git.khal...
It'd be nice to have that, to save memory on redundant page table entries for the range of mappings that is going to be the between all the processes. But I don't think it'd meaningfully improve the TLB hit rate.
