Re: spinlocks on HP-UX
От | Robert Haas |
---|---|
Тема | Re: spinlocks on HP-UX |
Дата | |
Msg-id | CA+TgmoZ4LFNYkpYz2tnYQjrM39nzXPRv+SUAOmj0bB-c+U=wYg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: spinlocks on HP-UX (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: spinlocks on HP-UX
|
Список | pgsql-hackers |
On Tue, Aug 30, 2011 at 4:05 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > This suggests that (1) an unlocked test in TAS_SPIN might be a good idea > on x86_64 after all, and (2) this test scenario may not be pushing the > system hard enough to expose limitations of the spinlock implementation. > > I am now thinking that the reason we saw clear differences in spinlock > implementations years ago, and now are not seeing them except on insane > hardware, is mainly that we've managed to reduce contention at higher > levels of the system. That doesn't mean spinlocks have become > uninteresting, just that "pgbench -S" isn't the ideal test case for > stressing them. I'm thinking maybe we need a test scenario that > generates sinval traffic, for example, or forces snapshots to be taken > more often. Ideas anyone? On current sources, with a workload that fits into shared_buffers, pgbench -S hammers the spinlock protecting ProcArrayLock extremely hard. I'm sure it's possible to come up with a test case that hammers them harder, but using a real workload can expose issues (like aggregate memory bandwidth) that you might not see otherwise. I am a bit surprised by your test results, because I also tried x86_64 with an unlocked test, also on pgbench -S, and I am pretty sure I got a regression. Maybe I'll try rerunning that. It seems possible that the x86_64 results depend on the particular sub-architecture and/or whether HT is in use, which would be kind of a nuisance. Also, did you happen to measure the amount of user time vs. system time that your test runs used? If this is on Linux, I am surprised that you didn't get killed by the lseek() contention problem on a machine with that many cores. I found it to be visible at 32 and crippling at 64, so I can't even imagine what it would be like at 160. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
В списке pgsql-hackers по дате отправления: