> > With the new pgbench, I ran a test with current and 7.1 and saw
> > not-so-small differences. Any idea to get better performance on 7.2
> > and AIX 5L combo?
>
> I'm thinking more and more that there must be something weird about the
> cs() routine that we use for spinlocks on AIX. Could someone dig into
> that and find exactly what it does and whether it's got any performance
> issues?
The manual page sais:
Note: The cs subroutine is only provided to support binary compatibility with AIX Version 3 applications. When
writingnew applications, it is not recommended to use this subroutine; it may cause reduced performance in the
future.Applications should use the compare_and_swap subroutine, unless they need to use unaligned memory locations.
I once tried to replace cs() with compare_and_swap() but saw worse performance
for the limited testing I did (probably on a single CPU). Maybe the "threat"
that performance will be reduced is actually true on AIX 5 now.
The thing would imho now be for Tatsuo to try to replace cs with compare_and_swap,
and see what happens on AIX 5.
Andreas
PS: Would the __powerpc__ assembly work on AIX machines ?