3 ms·
> MySQL connections use less memory [...] handled as a thread I've not measured recently, but from the angle of a PG dev I'd be very surprised if that weren't
by anarazel 8y ago
> MySQL connections use less memory [...] handled as a thread
I've not measured recently, but from the angle of a PG dev I'd be very surprised if that weren't true.
Note that one unfortunatelycannot just compare the memory usage of a individual postgres connection processes with a threaded connection model. Read-only things are mapped multiple times, and a lot of the read-write memory is copy-on-write and never modified after startup. And a good chunk of the required memory is in shared memory and thus not duplicated.
I strongly suggest using huge pages (huge_pages=on, and configure the os to allocate them) if memory usage due to connection count is a problem when using PG. The page table is usually one of the biggest users of per-process memory.