Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VUX60-0000NQ-Sk for pgsql-admin@arkaria.postgresql.org; Fri, 11 Oct 2013 07:25:13 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VUX60-0007Sz-CT for pgsql-admin@arkaria.postgresql.org; Fri, 11 Oct 2013 07:25:12 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VUX5z-0007Sf-7k for pgsql-admin@postgresql.org; Fri, 11 Oct 2013 07:25:11 +0000 Received: from sam.nabble.com ([216.139.236.26]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VUX5o-0005Rj-LS for pgsql-admin@postgresql.org; Fri, 11 Oct 2013 07:25:10 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1VUX5n-0000tj-QS for pgsql-admin@postgresql.org; Fri, 11 Oct 2013 00:24:59 -0700 Date: Fri, 11 Oct 2013 00:24:59 -0700 (PDT) From: luckyjackgao To: pgsql-admin@postgresql.org Message-ID: <1381476299799-5774252.post@n5.nabble.com> In-Reply-To: <524A90D1.5000109@iqbuzz.ru> References: <524A90D1.5000109@iqbuzz.ru> Subject: Re: PostgreSQL 9.2 - pg_dump out of memory when backuping a database with 300000000 large objects MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: 3.5 (+++) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Hello I have encountered some issues of PG crash when dealing with too much data. It seems that PG tries to do its task as quckly as it can be and will use as much resource as it can. Later I tried cgroups to limit resource usage to avoid PG consuming too much memory etc. too quickly. And PG works fine. I edited the following files: /etc/cgconfig.conf mount { cpuset = /cgroup/cpuset; cpu = /cgroup/cpu; cpuacct = /cgroup/cpuacct; memory = /cgroup/memory; devices = /cgroup/devices; freezer = /cgroup/freezer; net_cls = /cgroup/net_cls; blkio = /cgroup/blkio; } group test1 { perm { task{ uid=postgres; gid=postgres; } admin{ uid=root; gid=root; } } memory { memory.limit_in_bytes=300M; } } /etc/cgrules.conf # End of file postgres memory test1/ # Then set service on and restart , then login as postgres chkconfig cgconfig on chkconfig cgred on And I can find PG works under 300M memory limit. Best Regards jian gao -- View this message in context: http://postgresql.1045698.n5.nabble.com/PostgreSQL-9-2-pg-dump-out-of-memory-when-backuping-a-database-with-300000000-large-objects-tp5772931p5774252.html Sent from the PostgreSQL - admin mailing list archive at Nabble.com. -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin