| ▲ | ozgrakkurt 4 hours ago | |||||||
It is a crime that postgres isn't able to allocate with 1GB huge pages by changing a config parameter in 2026 Also a crime that people are still running databases with 4kb pages. To put it in perspective, this means you will have more than 30 million pages on a server with 128GB RAM. As an example, if there is 16bytes of metadata for memory page. The metadata itself would take more than half a gigabyte. | ||||||||
| ▲ | ldargin 2 hours ago | parent | next [-] | |||||||
Database systems lock pages when writing to them, to maintain integrity. Using 1GB pages would cause excessive blocking in many if not most transactional databases. | ||||||||
| ||||||||
| ▲ | dezgeg 4 hours ago | parent | prev | next [-] | |||||||
Even worse, the actual struct page on Linux is 64 bytes, so 4x your example | ||||||||
| ▲ | bonzini 4 hours ago | parent | prev | next [-] | |||||||
There is 64 bytes of metadata per memory page indeed. | ||||||||
| ▲ | andrewstuart 3 hours ago | parent | prev [-] | |||||||
Sensible defaults would be nice. | ||||||||