Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1a9A2M-0005Wq-De for pgsql-admin@arkaria.postgresql.org; Wed, 16 Dec 2015 11:14:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1a9A2L-00069a-W5 for pgsql-admin@arkaria.postgresql.org; Wed, 16 Dec 2015 11:14:26 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1a9A2L-00069T-AR for pgsql-admin@postgresql.org; Wed, 16 Dec 2015 11:14:25 +0000 Received: from mx4.wp.pl ([212.77.101.11]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1a9A2I-0002S4-7r for pgsql-admin@postgresql.org; Wed, 16 Dec 2015 11:14:24 +0000 Received: (wp-smtpd smtp.wp.pl 21007 invoked from network); 16 Dec 2015 12:14:18 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wp.pl; s=1024a; t=1450264458; bh=yC/I0BzIDVHgmDr0IX6TPO5LgjFSWWVaax/tz44J14w=; h=From:To:Subject; b=YNkH6htzHVwX74OBL8rY9Qv4TaWgm9sB/5ApJCE1ecog0vX6SjlTqY7m1y52xYvqk Q3Fu1w6X8HROaKXyK3yzLS7Qs+4+Sccwm7fIS5dIhY0hthM428lM8NZx3SODI9o1mL b1UqmxQqhNcOxDwtWeLjct2tQoOUe/T8NOQrzJME= Received: from out.poczta.wp.pl ([212.77.101.240]) (envelope-sender ) by smtp.wp.pl (WP-SMTPD) with SMTP for ; 16 Dec 2015 12:14:18 +0100 Date: Wed, 16 Dec 2015 12:14:18 +0100 From: =?ISO-8859-2?Q?Micha=B3_Nowak?= To: pgsql-admin Subject: Odp: Re: semop hanging - Postgres 9.4.4 Message-ID: <5671478a53eb46.11520163@wp.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 8bit Content-Disposition: inline X-Mailer: Interfejs WWW nowej poczty Wirtualnej Polski X-User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/600.7.12 (KHTML, like Gecko) Version/8.0.7 Safari/600.7.12 Organization: Poznaj Poczte WP http://poczta.wp.pl/info-start.html X-WP-IP: 37.157.203.70 X-WP-MailID: b93fe591726911a11ec66fd2bf5cf644 X-WP-AV: skaner antywirusowy poczty Wirtualnej Polski S. A. X-WP-SPAM: NO 0000000 [0YPE] X-Pg-Spam-Score: -2.7 (--) 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 Hi Sagar, > May I know what is the RAM of server and how much shmmax is configured ? > You can check if any Zombi or defunct process are running on the server. > I want to know if any maintenance activity performed same time? Thanks for you reply. Server has 16GB of RAM. Kernel shmmax has strange value, i think it's default on Ubuntu - i haven't changed that. kernel.shmall = 18446744073692774399 kernel.shmmax = 18446744073692774399 kernel.shmmni = 4096 I changed kermel.sem from defaults to: 250 512000 100 2048 There is no zombi nor defunct process. Now i have 3 stucked processes. First: psql01:~# strace -ffp 14135 Process 14135 attached select(0, NULL, NULL, NULL, {0, 1000}) = 0 (Timeout) select(0, NULL, NULL, NULL, {0, 1000}) = 0 (Timeout) select(0, NULL, NULL, NULL, {0, 1000}) = 0 (Timeout) select(0, NULL, NULL, NULL, {0, 1000}) = 0 (Timeout) semop(58261738, {{12, -1, 0}}, 1) = 0 semop(58261738, {{12, -1, 0}}, 1) = 0 semop(58261738, {{12, -1, 0}}, 1) = 0 select(0, NULL, NULL, NULL, {0, 1000}) = 0 (Timeout) select(0, NULL, NULL, NULL, {0, 1000}) = 0 (Timeout) semop(58261738, {{12, -1, 0}}, 1) = 0 semop(58261738, {{12, -1, 0}}, 1) = 0 semop(58261738, {{12, -1, 0}}, 1) = 0 semop(58261738, {{12, -1, 0}}, 1) = 0 semop(58261738, {{12, -1, 0}}, 1) = 0 select(0, NULL, NULL, NULL, {0, 1000}) = 0 (Timeout) select(0, NULL, NULL, NULL, {0, 1000}) = 0 (Timeout) Second: psql01:~# strace -ffp 12712 Process 12712 attached select(0, NULL, NULL, NULL, {0, 1000}) = 0 (Timeout) select(0, NULL, NULL, NULL, {0, 1000}) = 0 (Timeout) semop(57737434, {{6, 1, 0}}, 1) = 0 semop(57934048, {{2, -1, 0}}, 1) = 0 semop(57802972, {{7, 1, 0}}, 1) = 0 semop(57934048, {{2, -1, 0}}, 1) = 0 select(0, NULL, NULL, NULL, {0, 1000}) = 0 (Timeout) select(0, NULL, NULL, NULL, {0, 1000}) = 0 (Timeout) select(0, NULL, NULL, NULL, {0, 1000}) = 0 (Timeout) semop(57934048, {{2, -1, 0}}, 1) = 0 select(0, NULL, NULL, NULL, {0, 1000}) = 0 (Timeout) semop(57934048, {{2, -1, 0}}, 1) = 0 semop(57934048, {{2, -1, 0}}, 1) = 0 Third: psql02:~# strace -ffp 18283 Process 18283 attached semop(58523890, {{11, 1, 0}}, 1) = 0 semop(57802972, {{9, -1, 0}}, 1) = 0 select(0, NULL, NULL, NULL, {0, 1000}) = 0 (Timeout) semop(57802972, {{9, -1, 0}}, 1) = 0 semop(58818811, {{13, 1, 0}}, 1) = 0 semop(57802972, {{9, -1, 0}}, 1) = 0 select(0, NULL, NULL, NULL, {0, 1000}) = 0 (Timeout) select(0, NULL, NULL, NULL, {0, 1000}) = 0 (Timeout) semop(57802972, {{9, -1, 0}}, 1) = 0 select(0, NULL, NULL, NULL, {0, 1000}) = 0 (Timeout) select(0, NULL, NULL, NULL, {0, 1000}) = 0 (Timeout) select(0, NULL, NULL, NULL, {0, 1000}) = 0 (Timeout) select(0, NULL, NULL, NULL, {0, 1000}) = 0 (Timeout) perf top: 17.04% postgres [.] _bt_moveright 13.39% postgres [.] LWLockAcquire 8.82% postgres [.] LWLockRelease 8.11% postgres [.] _bt_checkpage 6.10% postgres [.] hash_search_with_hash_value 4.35% libc-2.19.so [.] __strcoll_l 3.16% postgres [.] 0x00000000002989ec 2.06% postgres [.] s_lock 1.99% postgres [.] _bt_compare 1.49% postgres [.] hash_any 1.41% postgres [.] 0x0000000000298a10 1.14% postgres [.] varstr_cmp 1.07% [kernel] [k] _raw_spin_unlock_irqrestore 1.00% libc-2.19.so [.] strlen 0.99% postgres [.] 0x0000000000298fdb 0.96% postgres [.] 0x00000000002989fc 0.80% postgres [.] LockBuffer 0.73% libc-2.19.so [.] 0x000000000009478e 0.60% postgres [.] ReadBufferExtended 0.49% postgres [.] bttextcmp 0.47% libc-2.19.so [.] 0x0000000000094787 0.44% [kernel] [k] finish_task_switch 0.40% postgres [.] _bt_relandgetbuf 0.40% postgres [.] ResourceOwnerForgetBuffer 0.40% libc-2.19.so [.] 0x0000000000094782 0.39% postgres [.] FunctionCall2Coll 0.38% postgres [.] ReleaseAndReadBuffer 0.31% postgres [.] pg_detoast_datum_packed Best regards, Michal -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin