Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kcY36-0005WV-UJ for pgsql-hackers@arkaria.postgresql.org; Tue, 10 Nov 2020 18:07:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kcY35-0007D5-Si for pgsql-hackers@arkaria.postgresql.org; Tue, 10 Nov 2020 18:07:19 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kcY35-0007Cy-LC for pgsql-hackers@lists.postgresql.org; Tue, 10 Nov 2020 18:07:19 +0000 Received: from mail-ej1-x644.google.com ([2a00:1450:4864:20::644]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kcY2y-00020i-T7 for pgsql-hackers@postgresql.org; Tue, 10 Nov 2020 18:07:18 +0000 Received: by mail-ej1-x644.google.com with SMTP id f23so12297119ejk.2 for ; Tue, 10 Nov 2020 10:07:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=7YMaYqE4ll1qWppcVVAsKhlilRiYjlpHI5OZTLYFsYM=; b=Dh0arowA27iYfUrraf13E2Ass9siK4qQTGRVvN8MrQzF9JKlPfLlm65ldtIrnRLf5J fgFN+LHfTeSzBPtxTB/NDb2ZcLAddxMkm0bJctEuyxl32lKEErNXZA50pWT8hKR9vDIC ojI90kAia9BILrzO0wyEDNzrSSJ5IqlLEH1MOfKIlqyTRVuWAx965oTs7SFdLy7omPiy tqZLWnJSmlJhokKNsistRTI0affspNJ+m5CJdR9c7JBwRsyvPtknmw+sefeH94dFTxrq x06BAMVeNf5wxYU/AIiV5G8KpIiAQcxB+zqtvW5g7fiJgeqho5daxN6pqMRaLcTdsiSY wE6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=7YMaYqE4ll1qWppcVVAsKhlilRiYjlpHI5OZTLYFsYM=; b=f3DeFnh0zIUe0btNBQ3FqI+dRJWAdDjpRTgn5VSCeKWXXix4TsICTTrjqkVGU0Nhhs 0w72RS3SX/tpQSBA5hZHD2KT3N3e83Ju5JnnY4AdrGCGjksHV1ZwFbUNrakMAoqwsFhA ov3vFFx0jzui1W4MVhNBjKyMYutqDkKygmqFaYhdIxT1Ptchd24pPuThss0/EJxOypDC X+pdaomsKPZ5xzuQD2+W9wOIx5pPJJQDEdUMCZC2fprDhwVMM9PmK/RCXP8Fjg3UYNEM C/RuWl8IiOaHGWFrhdddT2ixh4QgF9/M3vpS9eu4PSeEjdvUIzePiKkTMI3AytLQQ3f9 3eZA== X-Gm-Message-State: AOAM533Inga5FmmfFfDfY5t6lqZgKy58wLOyWjvj37FuzKyHZbDC6Y20 FMztkm6mzdMz69N1zrGrUYCrWbmBkVFOBvISXtta6Ry07pRzaKHuEmXoMnS24S7CDmbRwkW/jyC gMAcauZpsn2UTiGKqm7HPUTNhHO0aYAl0Nlhk/yxwZUn0Imj22glIuRxwLGuGGjV8w/nNw39o7O 1eHKv7sIpad7+PF0/77twXOQ6GUniUcEsBvvm131ZZGSm7nvDM9Lhum2beWP3ZDyd2Ylv7AkAtw 9wWpZshxmjJEaP5Fo9wjsrgkmrrB8A/ebB6pd7H X-Google-Smtp-Source: ABdhPJzcil/MRNjivUCCBbVf2B1HkN9TBu8vWGrMPO0nrG/fHGmwdJMnijKglBqrb/JdRyTbujdwjQ== X-Received: by 2002:a17:906:52d5:: with SMTP id w21mr20390118ejn.464.1605031629803; Tue, 10 Nov 2020 10:07:09 -0800 (PST) Received: from [10.137.0.4] (ip-86-49-245-76.net.upcbroadband.cz. [86.49.245.76]) by smtp.gmail.com with ESMTPSA id p10sm11241389ejy.68.2020.11.10.10.07.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 10 Nov 2020 10:07:08 -0800 (PST) Subject: Re: MultiXact\SLRU buffers configuration To: Andrey Borodin Cc: Tomas Vondra , Alexander Korotkov , Anastasia Lubennikova , Daniel Gustafsson , Kyotaro Horiguchi , pgsql-hackers References: <2087E87D-44CA-4443-8E6A-5087F07443F4@yandex-team.ru> <8A94938B-054C-4439-9866-2C220B4D0DD7@yandex-team.ru> <20201028013651.de5cj2xadgmba5nf@development> <13D8FD63-559A-4737-B7FD-05288D1CEF8B@yandex-team.ru> <20201028233243.ygm6yqlynkqpzekr@development> <43F3DE92-F236-4EA5-B4D6-39BEF6BD849D@yandex-team.ru> <20201029134933.xd4mh2cofuf6tdfz@development> <65C1B4BA-D16F-4939-978B-AC8F370F5A5E@yandex-team.ru> <9b4d17df-b811-8323-16be-3cab913216d1@enterprisedb.com> From: Tomas Vondra Message-ID: <35862787-8b4d-a290-789e-6e12dc6527e8@enterprisedb.com> Date: Tue, 10 Nov 2020 19:07:07 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------A131C6BE314487D1368E8D38" Content-Language: en-US X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------A131C6BE314487D1368E8D38 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit On 11/10/20 7:16 AM, Andrey Borodin wrote: > > >> 10 нояб. 2020 г., в 05:13, Tomas Vondra написал(а): >> After the issue reported in [1] got fixed, I've restarted the multi-xact >> stress test, hoping to reproduce the issue. But so far no luck :-( > > > Tomas, many thanks for looking into this. I figured out that to make multixact sets bigger transactions must hang for a while and lock large set of tuples. But not continuous range to avoid locking on buffer_content. > I did not manage to implement this via pgbench, that's why I was trying to hack on separate go program. But, essentially, no luck either. > I was observing something resemblant though > > пятница, 8 мая 2020 г. 15:08:37 (every 1s) > > pid | wait_event | wait_event_type | state | query > -------+----------------------------+-----------------+--------+---------------------------------------------------- > 41344 | ClientRead | Client | idle | insert into t1 select generate_series(1,1000000,1) > 41375 | MultiXactOffsetControlLock | LWLock | active | select * from t1 where i = ANY ($1) for share > 41377 | MultiXactOffsetControlLock | LWLock | active | select * from t1 where i = ANY ($1) for share > 41378 | | | active | select * from t1 where i = ANY ($1) for share > 41379 | MultiXactOffsetControlLock | LWLock | active | select * from t1 where i = ANY ($1) for share > 41381 | | | active | select * from t1 where i = ANY ($1) for share > 41383 | MultiXactOffsetControlLock | LWLock | active | select * from t1 where i = ANY ($1) for share > 41385 | MultiXactOffsetControlLock | LWLock | active | select * from t1 where i = ANY ($1) for share > (8 rows) > > but this picture was not stable. > Seems we haven't made much progress in reproducing the issue :-( I guess we'll need to know more about the machine where this happens. Is there anything special about the hardware/config? Are you monitoring size of the pg_multixact directory? > How do you collect wait events for aggregation? just insert into some table with cron? > No, I have a simple shell script (attached) sampling data from pg_stat_activity regularly. Then I load it into a table and aggregate to get a summary. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company --------------A131C6BE314487D1368E8D38 Content-Type: application/x-shellscript; name="collect-wait-events.sh" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="collect-wait-events.sh" IyEvYmluL2Jhc2gKCndoaWxlIC9iaW4vdHJ1ZTsgZG8KCglwc3FsIC10IC1BIC1jICdzZWxl Y3QgZXh0cmFjdChlcG9jaCBmcm9tIG5vdygpKSwgd2FpdF9ldmVudF90eXBlLCB3YWl0X2V2 ZW50LCBjb3VudCgqKSBmcm9tIHBnX3N0YXRfYWN0aXZpdHkgZ3JvdXAgYnkgMSwgMiwgMycg dGVzdAoKCXBzcWwgLXQgLUEgLWMgJ3NlbGVjdCBwZ19zbGVlcCgwLjEpJyB0ZXN0ID4gL2Rl di9udWxsIDI+JjEKCmRvbmUK --------------A131C6BE314487D1368E8D38--