Re: Avoiding repeated snapshot computation
От | Andres Freund |
---|---|
Тема | Re: Avoiding repeated snapshot computation |
Дата | |
Msg-id | 201111290241.32799.andres@anarazel.de обсуждение исходный текст |
Ответ на | Re: Avoiding repeated snapshot computation (Gurjeet Singh <singh.gurjeet@gmail.com>) |
Список | pgsql-hackers |
Hi Gurjeet, On Monday, November 28, 2011 08:55:28 PM Gurjeet Singh wrote: > On Sat, Nov 26, 2011 at 6:51 PM, Andres Freund <andres@anarazel.de> wrote: > > On Saturday, November 26, 2011 11:39:23 PM Robert Haas wrote: > > > On Sat, Nov 26, 2011 at 5:28 PM, Andres Freund <andres@anarazel.de> > > > > wrote: > > > > On Saturday, November 26, 2011 09:52:17 PM Tom Lane wrote: > > > >> I'd just as soon keep the fields in a logical order. > > > > > > > > Btw, I don't think the new order is necessarily worse than the old > > > > one. > > > > > > You forget to attach the benchmark results. > > > > > > My impression is that cache lines on modern hardware are 64 or 128 > > > *bytes*, in which case this wouldn't matter a bit. > > > > > > But testing is even better than guessing. > > > > Being prodded like that I ran a very quick benchmark on my workstation. > > Unfortunately that means I cannot work during the time which is why I > > kept it > > rather short... > > > > That machine has 2 E5520@2.27GHz which means 2(sockets) * 4(cores) * > > 2(threads) and 24GB of ram. > > > > Data was initialized with: pgbench -h /tmp/ --unlogged-tables -i -s 20 > > pgbench > > > > > > pgbench -h /tmp/ pgbench -S -j 16 -c 16 -T 60 > > ... > > Looks like a win to me. Even on this comparatively small machine. > This may not be necessary, but can you please share the modified config you > used for the last run. Can't right now because I don't have access from here, but I will do so. I don't think its particularly interesting though. > I tabulated your last results to make it more readable, and added columns > to show the improvement. > > origsnap reordersnap diff %age improvement > ------------------------------------------------------------------ > 102234.66402 103444.877879 1210.213859 1.1837607827 > 102003.449741 103385.888808 1382.439067 1.3552865815 > 102119.509053 103302.318923 1182.80987 1.1582604352 > 101722.410387 103372.659486 1650.249099 1.6223063263 > 101973.651318 103330.157612 1356.506294 1.3302517626 > 102056.440561 103313.833821 1257.39326 1.2320567454 > > That looks like a win to me too. We're getting a little over 1% improvement > for free! At least if we can convince Tom that such a change would be ok ;) I would like to see somebody running a benchmark on a machine with higher concurrency... > Maybe submitting this patch to the commitfest might help get some serious > consideration from a reviewer. It wasn't actually ment as an actual patch but a comment, but well ;). Will add it. Andres
В списке pgsql-hackers по дате отправления: