Re: LWLock contention: I think I understand the problem - Mailing list pgsql-hackers
From | Fredrik Estreen |
---|---|
Subject | Re: LWLock contention: I think I understand the problem |
Date | |
Msg-id | 3C3598E4.6000501@algonet.se Whole thread Raw |
In response to | Re: LWLock contention: I think I understand the problem (Bruce Momjian <pgman@candle.pha.pa.us>) |
Responses |
Re: LWLock contention: I think I understand the problem
|
List | pgsql-hackers |
Tom Lane wrote: >Attached is a modification that prevents additional waiters from being >released until the first releasee has a chance to run and acquire the >lock. Would you try this and see if it's better or not in your test >cases? It doesn't seem to help on a single CPU, but maybe on multiple >CPUs it'll make a difference. > Here are some results for Linux 2.2 on a Dual PentiumPro 200MHz, SCSI disks and way too litte RAM (just 128MB). I observed the loadavg. with the three different 7.2 versions and 50 clients, without patch the load stayed low (2-3), with patch no1 very high (12-14) and with patch no2 between the two others (6-8). Any of the patches seem to be a big win with the second version being slightly better. I could run benchmarks on 7.1 if that would be interesting. I used the same benchmark database with a VACUUM FULL between each version of the backend tested. I also re-run some of the tests on the same database after I tested all loads on the different versions, and numbers stayed very simmilar (difference: 0.1-0.3 tps). Best regrds Fredrik Estreen -------------------------------------- 7.2 CVS without patch -------------------------------------- transaction type: TPC-B (sort of) scaling factor: 50 number of clients: 1 number of transactions per client: 1000 number of transactions actually processed: 1000/1000 tps = 16.169579(including connections establishing) tps = 16.180891(excluding connections establishing) transaction type: TPC-B (sort of) scaling factor: 50 number of clients: 2 number of transactions per client: 1000 number of transactions actually processed: 2000/2000 tps = 17.392394(including connections establishing) tps = 17.404734(excluding connections establishing) scaling factor: 50 transaction type: TPC-B (sort of) number of clients: 5 number of transactions per client: 1000 number of transactions actually processed: 5000/5000 tps = 18.648499(including connections establishing) tps = 18.661991(excluding connections establishing) transaction type: TPC-B (sort of) scaling factor: 50 number of clients: 10 number of transactions per client: 1000 number of transactions actually processed: 10000/10000 tps = 15.405974(including connections establishing) tps = 15.416244(excluding connections establishing) transaction type: TPC-B (sort of) scaling factor: 50 number of clients: 25 number of transactions per client: 1000 number of transactions actually processed: 25000/25000 tps = 10.421300(including connections establishing) tps = 10.425750(excluding connections establishing) scaling factor: 50 number of clients: 50 number of transactions per client: 1000 number of transactions actually processed: 50000/50000 tps = 5.370482(including connections establishing) tps = 5.371573(excluding connections establishing) ------------------------------------- 7.2 CVS with patch no1 -------------------------------------- transaction type: TPC-B (sort of) scaling factor: 50 number of clients: 1 number of transactions per client: 1000 number of transactions actually processed: 1000/1000 tps = 15.614858(including connections establishing) tps = 15.625053(excluding connections establishing) transaction type: TPC-B (sort of) scaling factor: 50 number of clients: 2 number of transactions per client: 1000 number of transactions actually processed: 2000/2000 tps = 18.165989(including connections establishing) tps = 18.179211(excluding connections establishing) transaction type: TPC-B (sort of) scaling factor: 50 number of clients: 5 number of transactions per client: 1000 number of transactions actually processed: 5000/5000 tps = 18.979070(including connections establishing) tps = 18.993031(excluding connections establishing) transaction type: TPC-B (sort of) scaling factor: 50 number of clients: 10 number of transactions per client: 1000 number of transactions actually processed: 10000/10000 tps = 19.809421(including connections establishing) tps = 19.836396(excluding connections establishing) transaction type: TPC-B (sort of) scaling factor: 50 number of clients: 25 number of transactions per client: 1000 number of transactions actually processed: 25000/25000 tps = 19.927333(including connections establishing) tps = 19.942641(excluding connections establishing) transaction type: TPC-B (sort of) scaling factor: 50 number of clients: 50 number of transactions per client: 1000 number of transactions actually processed: 50000/50000 tps = 16.888624(including connections establishing) tps = 16.900136(excluding connections establishing) -------------------------------------- 7.2 CVS with patch no 2 -------------------------------------- transaction type: TPC-B (sort of) scaling factor: 50 number of clients: 1 number of transactions per client: 1000 number of transactions actually processed: 1000/1000 tps = 16.653249(including connections establishing) tps = 16.664507(excluding connections establishing) transaction type: TPC-B (sort of) scaling factor: 50 number of clients: 2 number of transactions per client: 1000 number of transactions actually processed: 2000/2000 tps = 18.773602(including connections establishing) tps = 18.787637(excluding connections establishing) transaction type: TPC-B (sort of) scaling factor: 50 number of clients: 5 number of transactions per client: 1000 number of transactions actually processed: 5000/5000 tps = 19.325495(including connections establishing) tps = 19.339827(excluding connections establishing) transaction type: TPC-B (sort of) scaling factor: 50 number of clients: 10 number of transactions per client: 1000 number of transactions actually processed: 10000/10000 tps = 20.251957(including connections establishing) tps = 20.267558(excluding connections establishing) transaction type: TPC-B (sort of) scaling factor: 50 number of clients: 25 number of transactions per client: 1000 number of transactions actually processed: 25000/25000 tps = 20.466319(including connections establishing) tps = 20.482390(excluding connections establishing) transaction type: TPC-B (sort of) scaling factor: 50 number of clients: 50 number of transactions per client: 1000 number of transactions actually processed: 50000/50000 tps = 17.742367(including connections establishing) tps = 17.754473(excluding connections establishing)
pgsql-hackers by date: