Re: Better LWLocks with compare-and-swap (9.4) - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Better LWLocks with compare-and-swap (9.4)
Date
Msg-id 5198715A.6070808@vmware.com
Whole thread Raw
In response to Re: Better LWLocks with compare-and-swap (9.4)  ("Dickson S. Guedes" <listas@guedesoft.net>)
Responses Re: Better LWLocks with compare-and-swap (9.4)  ("Dickson S. Guedes" <listas@guedesoft.net>)
List pgsql-hackers
On 18.05.2013 03:52, Dickson S. Guedes wrote:
>> pgbench -S is such a workload. With 9.3beta1, I'm seeing this
>> profile, when I run "pgbench -S -c64 -j64 -T60 -M prepared" on a
>> 32-core Linux machine:
>>
>> -  64.09%  postgres  postgres           [.] tas - tas - 99.83%
>> s_lock - 53.22% LWLockAcquire + 99.87% GetSnapshotData - 46.78%
>> LWLockRelease GetSnapshotData + GetTransactionSnapshot +   2.97%
>> postgres  postgres           [.] tas +   1.53%  postgres
>> libc-2.13.so       [.] 0x119873 +   1.44%  postgres  postgres
>> [.] GetSnapshotData +   1.29%  postgres  [kernel.kallsyms]  [k]
>> arch_local_irq_enable +   1.18%  postgres  postgres           [.]
>> AllocSetAlloc ...
>
> I'd like to test this here but I couldn't reproduce that perf output
> here in a 64-core or 24-core machines, could you post the changes to
> postgresql.conf and the perf arguments that you used?

Sure, here are the non-default postgresql.conf settings:

            name            |             current_setting
----------------------------+----------------------------------------- application_name           | psql autovacuum
           | off checkpoint_segments        | 70 config_file                | /home/hlinnakangas/data/postgresql.conf
data_directory            | /home/hlinnakangas/data default_text_search_config | pg_catalog.english hba_file
      | /home/hlinnakangas/data/pg_hba.conf ident_file                 | /home/hlinnakangas/data/pg_ident.conf
lc_collate                | en_US.UTF-8 lc_ctype                   | en_US.UTF-8 log_timezone               |
US/Pacificlogging_collector          | on max_connections            | 100 max_stack_depth            | 2MB
server_encoding           | UTF8 shared_buffers             | 2GB synchronous_commit         | off TimeZone
     | US/Pacific transaction_deferrable     | off transaction_isolation      | read committed transaction_read_only
 | off wal_buffers                | 16MB
 

While pgbench was running, I ran this:

perf record -p 6050 -g -e cpu-clock

to connect to one of the backends. (I used cpu-clock, because the 
default cpu-cycles event didn't work on the box)

- Heikki



pgsql-hackers by date:

Previous
From: Soroosh Sardari
Date:
Subject: Re: Road map to study about fetching a set of tuples - novice!
Next
From: Fabien COELHO
Date:
Subject: Re: pgbench vs. SERIALIZABLE