Some spinlock patch tests - Mailing list pgsql-hackers

From Emil Briggs
Subject Some spinlock patch tests
Date
Msg-id 200510070850.05974.emil@baymountain.com
Whole thread Raw
Responses Re: Some spinlock patch tests
List pgsql-hackers
I was testing the spinlock patches that Tom Lane posted last month
on a quad opteron system running Suse 9.2 for x86_64. The test sql and 
database was from a real application of ours and I was interested in seeing 
what effect the patches might have. The database is entirely RAM resident and 
nothing else was running while I ran the tests. The results are puzzling (to 
me anyway).

There was a big boost in performance when the concurrency level was less than 
or equal to 4 and a much smaller boost when the concurrency level was greater 
than 3. The puzzling part was the context switches though. Why the big 
falloff above 5? In any case these results explain some performance meltdowns 
we have been seeing. When the concurrency goes above 5 the performance falls 
off so rapidly that we would be better running serially on a single processor 
and the system has a hard time recovering.


with patch
N     time     cs from vmstat
1     37        50-100
2     49       70k-80k
4     79      290k-300k
5     183       6k-10k
8     299       4k-6k

without patch
N     time     cs from vmstat
1     36        50-100
2     53       55k-60k
4    185       45k-55k
5    218        7k-10k
8    315        4k-6k


pgsql-hackers by date:

Previous
From: Andreas Pflug
Date:
Subject: Re: Vote needed: revert beta2 changes or not?
Next
From: Tom Lane
Date:
Subject: Re: Some spinlock patch tests