Re: Using a lot of memory in each session.
Re: Using a lot of memory in each session.
От:
Andres Freund <andres@anarazel.de>
Дата:
Hi, On 2024-09-24 16:58:11 +0900, DBA wrote: > 1. A description of what you are trying to achieve and what results you expect > : > > > We set shared_buffer = 70GB, max_connections = 300, work_mem = 300MB. > > > We thought the session memory could be adjusted with the work_mem variable, but > no. noticed that each session consumed more than 500MB. How did you determine you're using a lot of memory in each session? Unless you use huge pages, the first access to a shared memory page in a process will start to attribute the shared memory to the RES (or RSS) of a process as shown in top/ps. See https://postgr.es/m/p3wmyj7cllclyxgebcqilds5f25yfuyozwerel4no54k5oro6f%40ly5ivt67icfb for a bit more detail. Greetings, Andres Freund