Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id D905A9FCA9C; Fri, 26 Oct 2007 12:45:29 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 44802-06; Fri, 26 Oct 2007 12:45:22 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from brmea-mail-2.sun.com (brmea-mail-2.Sun.COM [192.18.98.43]) by postgresql.org (Postfix) with ESMTP id 628B09FBDF9; Fri, 26 Oct 2007 12:45:21 -0300 (ADT) Received: from fe-amer-09.sun.com ([192.18.109.79]) by brmea-mail-2.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l9QFjKEa010106; Fri, 26 Oct 2007 15:45:21 GMT Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) id <0JQI00001Z6F7200@mail-amer.sun.com> (original mail from J.K.Shah@Sun.COM) ; Fri, 26 Oct 2007 09:45:20 -0600 (MDT) Received: from jignesh-shahs-computer.local ([129.150.37.210]) by mail-amer.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTPSA id <0JQI0063CZRGMPE0@mail-amer.sun.com>; Fri, 26 Oct 2007 09:45:18 -0600 (MDT) Date: Fri, 26 Oct 2007 11:45:26 -0400 From: "Jignesh K. Shah" Subject: Re: [HACKERS] 8.3beta1 testing on Solaris In-reply-to: <4721ED75.7090607@sun.com> To: "Jignesh K. Shah" Cc: Tom Lane , Josh Berkus , pgsql-performance@postgresql.org, Gregory Stark , pgsql-hackers@postgresql.org Message-id: <47220B96.4080009@sun.com> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7BIT References: <4720FB72.8060800@sun.com> <871wbi95nb.fsf@oxford.xeocode.com> <29721.1193359867@sss.pgh.pa.us> <200710251956.56744.josh@agliodbs.com> <2139.1193369168@sss.pgh.pa.us> <4721ED75.7090607@sun.com> User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/302 X-Sequence-Number: 27324 Tom, Here is what I did: I started aggregating all read information: First I also had added group by pid (arg0,arg1, pid) and the counts were all coming as 1 Then I just grouped by filename and location (arg0,arg1 of reads) and the counts came back as # cat read.d #!/usr/sbin/dtrace -s syscall::read:entry /execname=="postgres"/ { @read[fds[arg0].fi_pathname, arg1] = count(); } # ./read.d dtrace: script './read.d' matched 1 probe ^C /export/home0/igen/pgdata/pg_clog/0014 -2753028293472 1 /export/home0/igen/pgdata/pg_clog/0014 -2753028277088 1 /export/home0/igen/pgdata/pg_clog/0015 -2753028244320 2 /export/home0/igen/pgdata/pg_clog/0015 -2753028268896 14 /export/home0/igen/pgdata/pg_clog/0015 -2753028260704 25 /export/home0/igen/pgdata/pg_clog/0015 -2753028252512 27 /export/home0/igen/pgdata/pg_clog/0015 -2753028277088 28 /export/home0/igen/pgdata/pg_clog/0015 -2753028293472 37 FYI I pressed ctrl-c within like less than a second So to me this seems that multiple processes are reading the same page from different pids. (This was with about 600 suers active. Aparently we do have a problem that we are reading the same buffer address again. (Same as not being cached anywhere or not finding it in cache anywhere). I reran lock wait script on couple of processes and did not see CLogControlFileLock as a problem.. # ./83_lwlock_wait.d 14341 Lock Id Mode Count WALInsertLock Exclusive 1 ProcArrayLock Exclusive 16 Lock Id Combined Time (ns) WALInsertLock 383109 ProcArrayLock 198866236 # ./83_lwlock_wait.d 14607 Lock Id Mode Count WALInsertLock Exclusive 2 ProcArrayLock Exclusive 15 Lock Id Combined Time (ns) WALInsertLock 55243 ProcArrayLock 69700140 # What will help you find out why it is reading the same page again? -Jignesh Jignesh K. Shah wrote: > I agree with Tom.. somehow I think increasing NUM_CLOG_BUFFERS is > just avoiding the symptom to a later value.. I promise to look more > into it before making any recommendations to increase NUM_CLOG_BUFFERs. > > > Because though "iGen" showed improvements in that area by increasing > num_clog_buffers , EAStress had shown no improvements.. Plus the > reason I think this is not the problem in 8.3beta1 since the Lock > Output clearly does not show CLOGControlFile as to be the issue which > I had seen in earlier case. So I dont think that increasing > NUM_CLOG_BUFFERS will change thing here. > > Now I dont understand the code pretty well yet I see three hotspots > and not sure if they are related to each other > * ProcArrayLock waits - causing Waits as reported by > 83_lockwait.d script > * SimpleLRUReadPage - causing read IOs as reported by > iostat/rsnoop.d > * GetSnapshotData - causing CPU utilization as reported by hotuser > > But I will shut up and do more testing. > > Regards, > Jignesh > > > > Tom Lane wrote: >> Josh Berkus writes: >> >>> Actually, 32 made a significant difference as I recall ... do you >>> still have the figures for that, Jignesh? >>> >> >> I'd want to see a new set of test runs backing up any call for a change >> in NUM_CLOG_BUFFERS --- we've changed enough stuff around this area that >> benchmarks using code from a few months back shouldn't carry a lot of >> weight. >> >> regards, tom lane >> > > ---------------------------(end of broadcast)--------------------------- > TIP 5: don't forget to increase your free space map settings