NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/54181: postgresql/pg_dump causes memory exhaustion
>Number: 54181
>Category: kern
>Synopsis: postgresql/pg_dump causes memory exhaustion
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu May 09 08:10:00 +0000 2019
>Originator: Mustafa Dogan
>Release: NetBSD 8_STABLE
>Organization:
TESMER
>Environment:
NetBSD localhost 8.0_STABLE NetBSD 8.0_STABLE (GENERIC) #0: Fri Mar 8 03:35:49 +03 2019 root@localhost:/root/OBJ/sys/arch/amd64/compile/GENERIC amd64
>Description:
This PR seems to pkgsrc problem, but I think this problem is related to vm.
Some of packages causes memory exhaustion and DoS. For example PostgreSQL and samba3, which I tried, uses all of available memory, swap, and causes server unusable.
sysctl vm.{anon,file,exec}{min,max} doesn't help.
My scenario is follows:
I installed and used postgresql for approximately 15 years on NetBSD. When I upgrade NetBSD 8 (in fact, I started using NetBSD 8.0_BETA, and it has the same problem too), problems arises. There weren't any problem with NetBSD 7. My database size is bigger than RAM size. Server RAM is 128 GB. While I trying to dump database, (pg_dumpall) RAM usage is increasing very fast. After dump size exceeds RAM size, server starts using swap. After dump size exceeds RAM+swap size, server crashes. Without reboot, can't reduce RAM size.
A similar scenario is applicable for samba3. Transfering file(s) causes DoS.
top shows memory usage as follows:
load averages: 0.12, 0.20, 0.20; up 7+07:20:28 10:59:48
227 processes: 225 sleeping, 2 on CPU
CPU states: 0.0% user, 0.0% nice, 0.4% system, 0.0% interrupt, 99.4% idle
Memory: 100G Act, 212K Inact, 1104K Wired, 50M Exec, 120G File, 7120M Free
S
>How-To-Repeat:
On NetBSD 8, Install postgresql and have big database(s). Run pg_dump, pg_dumpall, or pg_basebackup. Then, monitor memory usage.
>Fix:
Home |
Main Index |
Thread Index |
Old Index