pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedPOstgresql Memory Problem
11+ messages / 8 participants
[nested] [flat]
* POstgresql Memory Problem
@ 2003-10-20 08:45 Azman Jantan <azmanjantan@gmi.edu.my>
0 siblings, 0 replies; 11+ messages in thread
From: Azman Jantan @ 2003-10-20 08:45 UTC (permalink / raw)
To: pgsql-admin
Hi all..
i've got a problem with the memory that postgresql 7.3.2 used in RedHat 9.
When the memory usage reached 80% or more of the total memory in the
system..
the memory just keep stuck there..The thing did not reduce bt itself...
Then i decided to stop the postgresql service. But ...the memory that
postgresql used still stuck...I used top to check the memory...
The only way to solved it now...is via rebooting the machine..But that
is ridiculous..
Need Help....maybe i miss configured the postgresql.conf.
But give me something to tinker with..
thank in advanced...
--azman--
^ permalink raw reply [nested|flat] 11+ messages in thread
* Postgresql Memory Problem
@ 2003-10-20 09:01 dotaku <dotaku@hotpop.com>
2003-10-20 09:35 ` Re: Postgresql Memory Problem Mailing List <list@1006.org>
2003-10-20 17:23 ` Re: Postgresql Memory Problem scott.marlowe <scott.marlowe@ihs.com>
0 siblings, 2 replies; 11+ messages in thread
From: dotaku @ 2003-10-20 09:01 UTC (permalink / raw)
To: pgsql-admin
Hi all..
i've got a problem with the memory that postgresql 7.3.2 used in RedHat 9.
When the memory usage reached 80% or more of the total memory in the
system..
the memory just keep stuck there..The thing did not reduce bt itself...
Then i decided to stop the postgresql service. But ...the memory that
postgresql used still stuck...I used top to check the memory...
The only way to solved it now...is via rebooting the machine..But that
is ridiculous..
Need Help....maybe i miss configured the postgresql.conf.
But give me something to tinker with..
thank in advanced...
--azman--
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: Postgresql Memory Problem
2003-10-20 09:01 Postgresql Memory Problem dotaku <dotaku@hotpop.com>
@ 2003-10-20 09:35 ` Mailing List <list@1006.org>
1 sibling, 0 replies; 11+ messages in thread
From: Mailing List @ 2003-10-20 09:35 UTC (permalink / raw)
To: dotaku@hotpop.com; +Cc: pgsql-admin
> i've got a problem with the memory that postgresql 7.3.2 used in RedHat 9.
> When the memory usage reached 80% or more of the total memory in the
> system..
> the memory just keep stuck there..The thing did not reduce bt itself...
>
> Then i decided to stop the postgresql service. But ...the memory that
> postgresql used still stuck...I used top to check the memory...
It's a Linux thing, probably. The mem is still allocated as buffers.
When somebody else claims it, it will get it. No need to worry...
Bye, Chris.
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: Postgresql Memory Problem
2003-10-20 09:01 Postgresql Memory Problem dotaku <dotaku@hotpop.com>
@ 2003-10-20 17:23 ` scott.marlowe <scott.marlowe@ihs.com>
2003-10-21 13:31 ` Re: Postgresql Memory Problem dotaku <dotaku@hotpop.com>
2003-10-21 13:39 ` Re: Postgresql Memory Problem Soeren Laursen <sl@scrooge.dk>
1 sibling, 2 replies; 11+ messages in thread
From: scott.marlowe @ 2003-10-20 17:23 UTC (permalink / raw)
To: dotaku <dotaku@hotpop.com>; +Cc: pgsql-admin
On Mon, 20 Oct 2003, dotaku wrote:
> Hi all..
>
> i've got a problem with the memory that postgresql 7.3.2 used in RedHat 9.
> When the memory usage reached 80% or more of the total memory in the
> system..
> the memory just keep stuck there..The thing did not reduce bt itself...
>
> Then i decided to stop the postgresql service. But ...the memory that
> postgresql used still stuck...I used top to check the memory...
>
> The only way to solved it now...is via rebooting the machine..But that
> is ridiculous..
> Need Help....maybe i miss configured the postgresql.conf.
>
> But give me something to tinker with..
Are you talking about something like this:
Mem: 1543980K av, 1538248K used, 5732K free, 266768K shrd, 36064K buff
Swap: 2048208K av, 194532K used, 1853676K free 802612K cached
Where I'm only showing 5732k free, but 802612k cached? That's normal.
The linux kernel is just using the spare memory for file caching until
something tries to allocate a big chunk of memory, then it will give it
back. That's normal operation.
Or is it something else?
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: Postgresql Memory Problem
2003-10-20 09:01 Postgresql Memory Problem dotaku <dotaku@hotpop.com>
2003-10-20 17:23 ` Re: Postgresql Memory Problem scott.marlowe <scott.marlowe@ihs.com>
@ 2003-10-21 13:31 ` dotaku <dotaku@hotpop.com>
2003-10-21 13:42 ` Re: Postgresql Memory Problem Andrew Sullivan <andrew@libertyrms.info>
2003-10-21 15:44 ` Re: Postgresql Memory Problem scott.marlowe <scott.marlowe@ihs.com>
1 sibling, 2 replies; 11+ messages in thread
From: dotaku @ 2003-10-21 13:31 UTC (permalink / raw)
To: scott.marlowe <scott.marlowe@ihs.com>; +Cc: pgsql-admin
scott.marlowe wrote:
>On Mon, 20 Oct 2003, dotaku wrote:
>
>
>
>>Hi all..
>>
>>i've got a problem with the memory that postgresql 7.3.2 used in RedHat 9.
>>When the memory usage reached 80% or more of the total memory in the
>>system..
>>the memory just keep stuck there..The thing did not reduce bt itself...
>>
>>Then i decided to stop the postgresql service. But ...the memory that
>>postgresql used still stuck...I used top to check the memory...
>>
>>The only way to solved it now...is via rebooting the machine..But that
>>is ridiculous..
>>Need Help....maybe i miss configured the postgresql.conf.
>>
>>But give me something to tinker with..
>>
>>
>
>Are you talking about something like this:
>
>Mem: 1543980K av, 1538248K used, 5732K free, 266768K shrd, 36064K buff
>Swap: 2048208K av, 194532K used, 1853676K free 802612K cached
>
>Where I'm only showing 5732k free, but 802612k cached? That's normal.
>The linux kernel is just using the spare memory for file caching until
>something tries to allocate a big chunk of memory, then it will give it
>back. That's normal operation.
>
>Or is it something else?
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 7: don't forget to increase your free space map settings
>
>
>
Thanks...but can I flush a postgreql server unused memory after stopping
it. The problem that i had is that, even after stopping all postgresql
services...the used memory is still more than 80% of the total RAM..
any idea how to flush it. I've read somewhere about kflushd and
bdflushd. How to used it...Both are kernel related. Is there any user
space program that can kick it.
--azman---
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: Postgresql Memory Problem
2003-10-20 09:01 Postgresql Memory Problem dotaku <dotaku@hotpop.com>
2003-10-20 17:23 ` Re: Postgresql Memory Problem scott.marlowe <scott.marlowe@ihs.com>
2003-10-21 13:31 ` Re: Postgresql Memory Problem dotaku <dotaku@hotpop.com>
@ 2003-10-21 13:42 ` Andrew Sullivan <andrew@libertyrms.info>
1 sibling, 0 replies; 11+ messages in thread
From: Andrew Sullivan @ 2003-10-21 13:42 UTC (permalink / raw)
To: pgsql-admin
On Tue, Oct 21, 2003 at 09:31:49PM +0800, dotaku wrote:
> Thanks...but can I flush a postgreql server unused memory after stopping
> it. The problem that i had is that, even after stopping all postgresql
> services...the used memory is still more than 80% of the total RAM..
It sounds like you're worrying about something that you need not
worry about. It is totally normal for your OS to "use up" memory
that is not otherwise used. Why have it if it's not going to be
used?
A
----
Andrew Sullivan 204-4141 Yonge Street
Afilias Canada Toronto, Ontario Canada
<andrew@libertyrms.info> M2P 2A8
+1 416 646 3304 x110
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: Postgresql Memory Problem
2003-10-20 09:01 Postgresql Memory Problem dotaku <dotaku@hotpop.com>
2003-10-20 17:23 ` Re: Postgresql Memory Problem scott.marlowe <scott.marlowe@ihs.com>
2003-10-21 13:31 ` Re: Postgresql Memory Problem dotaku <dotaku@hotpop.com>
@ 2003-10-21 15:44 ` scott.marlowe <scott.marlowe@ihs.com>
1 sibling, 0 replies; 11+ messages in thread
From: scott.marlowe @ 2003-10-21 15:44 UTC (permalink / raw)
To: dotaku <dotaku@hotpop.com>; +Cc: pgsql-admin
On Tue, 21 Oct 2003, dotaku wrote:
> scott.marlowe wrote:
>
> >On Mon, 20 Oct 2003, dotaku wrote:
> >
> >
> >
> >>Hi all..
> >>
> >>i've got a problem with the memory that postgresql 7.3.2 used in RedHat 9.
> >>When the memory usage reached 80% or more of the total memory in the
> >>system..
> >>the memory just keep stuck there..The thing did not reduce bt itself...
> >>
> >>Then i decided to stop the postgresql service. But ...the memory that
> >>postgresql used still stuck...I used top to check the memory...
> >>
> >>The only way to solved it now...is via rebooting the machine..But that
> >>is ridiculous..
> >>Need Help....maybe i miss configured the postgresql.conf.
> >>
> >>But give me something to tinker with..
> >>
> >>
> >
> >Are you talking about something like this:
> >
> >Mem: 1543980K av, 1538248K used, 5732K free, 266768K shrd, 36064K buff
> >Swap: 2048208K av, 194532K used, 1853676K free 802612K cached
> >
> >Where I'm only showing 5732k free, but 802612k cached? That's normal.
> >The linux kernel is just using the spare memory for file caching until
> >something tries to allocate a big chunk of memory, then it will give it
> >back. That's normal operation.
> >
> >Or is it something else?
> >
> >
> >---------------------------(end of broadcast)---------------------------
> >TIP 7: don't forget to increase your free space map settings
> >
> >
> >
> Thanks...but can I flush a postgreql server unused memory after stopping
> it. The problem that i had is that, even after stopping all postgresql
> services...the used memory is still more than 80% of the total RAM..
>
> any idea how to flush it. I've read somewhere about kflushd and
> bdflushd. How to used it...Both are kernel related. Is there any user
> space program that can kick it.
I repeat my question, does your memory look like what I showed? If so,
then why would you want to flush the memory? What good is memory doing
you if it's sitting there empty? None. By being used as cache by the OS,
the spare memory is getting something done, i.e. speeding up your system.
should a program need memory, the cache will be dumped and the memory made
available automatically. So, if your system DOES look like the one I
showed top for, then there is NO PROBLEM and you need to find something
else to worry about.
If memory is still showing as belonging to postgresql processes, that's a
different matter entirely.
So, which is it? Does the machine have a top output that looks like mine
(please, feel free to share yours, it's quite helpful to us to see what
your machine looks like.) or does it have some other issue?
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: Postgresql Memory Problem
2003-10-20 09:01 Postgresql Memory Problem dotaku <dotaku@hotpop.com>
2003-10-20 17:23 ` Re: Postgresql Memory Problem scott.marlowe <scott.marlowe@ihs.com>
@ 2003-10-21 13:39 ` Soeren Laursen <sl@scrooge.dk>
1 sibling, 0 replies; 11+ messages in thread
From: Soeren Laursen @ 2003-10-21 13:39 UTC (permalink / raw)
To: dotaku <dotaku@hotpop.com>; +Cc: pgsql-admin
> Thanks...but can I flush a postgreql server unused memory after stopping
> it. The problem that i had is that, even after stopping all postgresql
> services...the used memory is still more than 80% of the total RAM..
>
> any idea how to flush it. I've read somewhere about kflushd and
> bdflushd. How to used it...Both are kernel related. Is there any user
> space program that can kick it.
No need for it as Scott wrote!
The kernel will claim it when it needs it.
Søren,
^ permalink raw reply [nested|flat] 11+ messages in thread
* postgresql memory problem
@ 2022-02-21 07:56 Kenny Bachman <kenny.bachman17@gmail.com>
2022-02-21 08:23 ` Re: postgresql memory problem Laurenz Albe <laurenz.albe@cybertec.at>
0 siblings, 1 reply; 11+ messages in thread
From: Kenny Bachman @ 2022-02-21 07:56 UTC (permalink / raw)
To: pgsql-admin@lists.postgresql.org
Hello Team,
Firstly, I want to thank you all for the amazing help.
I need your guidance with PostgreSQL. So, I have a 3-nodes patroni cluster
running PostgreSQL 12.9 version. I got some errors related to a memory
issue.
ERROR: could not resize shared memory segment "/PostgreSQL.346141036" to
16776236 bytes: No space left on device
FATAL: out of memory
DETAIL: Failed on request of size 128 in-memory context
"CacheMemoryContext"
My PostgreSQL parameters related to memory;
work_mem : 128MB
shared_buffer: 16GB
effective_cache_size: 200GB
maintenance_work_mem: 2GB
My server profile:
free -g
total used free shared buff/cache
available
Mem: 377 28 22 0 326
347
Swap: 127 0 127
df
tmpfs 189G 2.0M 189G 1% /dev/shm
What do you think about this? Can you advise some hints?
Best regards,
KB
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: postgresql memory problem
2022-02-21 07:56 postgresql memory problem Kenny Bachman <kenny.bachman17@gmail.com>
@ 2022-02-21 08:23 ` Laurenz Albe <laurenz.albe@cybertec.at>
2022-02-21 08:56 ` Re: postgresql memory problem Kenny Bachman <kenny.bachman17@gmail.com>
0 siblings, 1 reply; 11+ messages in thread
From: Laurenz Albe @ 2022-02-21 08:23 UTC (permalink / raw)
To: Kenny Bachman <kenny.bachman17@gmail.com>; pgsql-admin@lists.postgresql.org
On Mon, 2022-02-21 at 10:56 +0300, Kenny Bachman wrote:
> Firstly, I want to thank you all for the amazing help.
> I need your guidance with PostgreSQL. So, I have a 3-nodes patroni cluster running PostgreSQL 12.9 version. I got some errors related to a memory issue.
>
> ERROR: could not resize shared memory segment "/PostgreSQL.346141036" to 16776236 bytes: No space left on device
>
> FATAL: out of memory
> DETAIL: Failed on request of size 128 in-memory context "CacheMemoryContext"
>
> My PostgreSQL parameters related to memory;
> work_mem : 128MB
> shared_buffer: 16GB
> effective_cache_size: 200GB
> maintenance_work_mem: 2GB
>
> My server profile:
> free -g
> total used free shared buff/cache available
> Mem: 377 28 22 0 326 347
> Swap: 127 0 127
>
> df
> tmpfs 189G 2.0M 189G 1% /dev/shm
>
> What do you think about this? Can you advise some hints?
There should be a memory dump in the PostgreSQL log.
Considering the small size of 128, the problem might be somewhere else.
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: postgresql memory problem
2022-02-21 07:56 postgresql memory problem Kenny Bachman <kenny.bachman17@gmail.com>
2022-02-21 08:23 ` Re: postgresql memory problem Laurenz Albe <laurenz.albe@cybertec.at>
@ 2022-02-21 08:56 ` Kenny Bachman <kenny.bachman17@gmail.com>
0 siblings, 0 replies; 11+ messages in thread
From: Kenny Bachman @ 2022-02-21 08:56 UTC (permalink / raw)
To: Laurenz Albe <laurenz.albe@cybertec.at>; +Cc: pgsql-admin@lists.postgresql.org
Hi Laurenz,
Thank you so much for your suggestion. I set a lower work_mem setting
(64MB), then I will monitor for a while.
Best regards,
KB
Laurenz Albe <laurenz.albe@cybertec.at>, 21 Şub 2022 Pzt, 11:23 tarihinde
şunu yazdı:
> On Mon, 2022-02-21 at 10:56 +0300, Kenny Bachman wrote:
> > Firstly, I want to thank you all for the amazing help.
> > I need your guidance with PostgreSQL. So, I have a 3-nodes patroni
> cluster running PostgreSQL 12.9 version. I got some errors related to a
> memory issue.
> >
> > ERROR: could not resize shared memory segment "/PostgreSQL.346141036"
> to 16776236 bytes: No space left on device
> >
> > FATAL: out of memory
> > DETAIL: Failed on request of size 128 in-memory context
> "CacheMemoryContext"
> >
> > My PostgreSQL parameters related to memory;
> > work_mem : 128MB
> > shared_buffer: 16GB
> > effective_cache_size: 200GB
> > maintenance_work_mem: 2GB
> >
> > My server profile:
> > free -g
> > total used free shared
> buff/cache available
> > Mem: 377 28 22 0 326
> 347
> > Swap: 127 0 127
> >
> > df
> > tmpfs 189G 2.0M 189G 1% /dev/shm
> >
> > What do you think about this? Can you advise some hints?
>
> There should be a memory dump in the PostgreSQL log.
> Considering the small size of 128, the problem might be somewhere else.
>
> Yours,
> Laurenz Albe
> --
> Cybertec | https://www.cybertec-postgresql.com
>
>
^ permalink raw reply [nested|flat] 11+ messages in thread
end of thread, other threads:[~2022-02-21 08:56 UTC | newest]
Thread overview: 11+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-10-20 08:45 POstgresql Memory Problem Azman Jantan <azmanjantan@gmi.edu.my>
2003-10-20 09:01 Postgresql Memory Problem dotaku <dotaku@hotpop.com>
2003-10-20 09:35 ` Re: Postgresql Memory Problem Mailing List <list@1006.org>
2003-10-20 17:23 ` Re: Postgresql Memory Problem scott.marlowe <scott.marlowe@ihs.com>
2003-10-21 13:31 ` Re: Postgresql Memory Problem dotaku <dotaku@hotpop.com>
2003-10-21 13:42 ` Re: Postgresql Memory Problem Andrew Sullivan <andrew@libertyrms.info>
2003-10-21 15:44 ` Re: Postgresql Memory Problem scott.marlowe <scott.marlowe@ihs.com>
2003-10-21 13:39 ` Re: Postgresql Memory Problem Soeren Laursen <sl@scrooge.dk>
2022-02-21 07:56 postgresql memory problem Kenny Bachman <kenny.bachman17@gmail.com>
2022-02-21 08:23 ` Re: postgresql memory problem Laurenz Albe <laurenz.albe@cybertec.at>
2022-02-21 08:56 ` Re: postgresql memory problem Kenny Bachman <kenny.bachman17@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox