High memory usage
От | Rainer Mager |
---|---|
Тема | High memory usage |
Дата | |
Msg-id | NEBBJBCAFMMNIHGDLFKGIEEJEEAA.rmager@vgkk.com обсуждение исходный текст |
Ответы |
Re: High memory usage
|
Список | pgsql-admin |
Hi all, We're seeing one usage of a database use significant more memory than we're used to and I'm hoping for some hints at what Postgres allocates memory for. BTW, we're running PG 7.1 on Linux. First of all we see some of the PG processes use as much as 80 MB (according to top and ps). This seems to be allocated during a query (SELECT). Unfortunately, we haven't been able to discover exactly what query is doing this. Anyway, the first problem is this high memory allocation. Considering the database is only about 80 MB total (according to disk usage of the entire data directory), allocating 80 MB seems excessive. The second significant problem is that this memory allocation does not go down once the SELECT is completed. According to ps the process in IDLE yet the memory usage remains the same. If it was only one process then that would be fine but we see this happening with as many as 3 processes simultaneously and the box only has 256 MB RAM (although we plan to up that to 512 soon). So, if anyone has any general idea as to when PG allocates memory (for example, I assume and hope, the PG process wouldn't allocate enough memory to have the entire result set in memory) I'd appreciate the info. Any other clues are also welcome. We have other, near identical, instances of this database which do not show this behavior. The particular queries being done will differ between them and one particular table is about 10 times larger (150,000 rows instead of 15,000) in this db as compared to the others but I don't see either of those factors causing this large a difference. Well, I don't know, how much memory do semi-complex queries take? Thanks, --Rainer
В списке pgsql-admin по дате отправления: