postgresql-performance using sysbench

Niki Denev nike_d at cytexbg.com
Thu Jan 31 08:55:59 PST 2008


On Jan 30, 2008 9:57 PM, Ivan Voras <ivoras at freebsd.org> wrote:
> On 30/01/2008, Kris Kennaway <kris at freebsd.org> wrote:
>
> > Rewrite of the lockmgr primitive, for starters.  Then we'll see what
> > remains.
>
> Ok, I know about the lockmgr efforts, and they will surely help some
> loads. I'll try to compile the results I've been talking about in a
> few days and post them.
>

Just a thought on the effect that HZ has on filesystem (and overall)
performance :
Linux has sort of backtracked from defaulting to HZ=1000 and enable it
only on kernels compiled
for "Desktop" work, and setting HZ=250 for the "Server" profile.

A very quick /usr/ports/benchmarks/postmark benchmark on my machine
(FreeBSD 7.0 PREREL with ULE on dualcore C2D) shows this :

HZ=1000
Time:
        239 seconds total
        122 seconds of transactions (4 per second)

Files:
        749 created (3 per second)
                Creation alone: 500 files (4 per second)
                Mixed with transactions: 249 files (2 per second)
        267 read (2 per second)
        233 appended (1 per second)
        749 deleted (3 per second)
                Deletion alone: 498 files (498 per second)
                Mixed with transactions: 251 files (2 per second)

Data:
        573.06 megabytes read (2.40 megabytes per second)
        1699.49 megabytes written (7.11 megabytes per second)

HZ=250
Time:
        178 seconds total
        79 seconds of transactions (6 per second)

Files:
        749 created (4 per second)
                Creation alone: 500 files (5 per second)
                Mixed with transactions: 249 files (3 per second)
        267 read (3 per second)
        233 appended (2 per second)
        749 deleted (4 per second)
                Deletion alone: 498 files (498 per second)
                Mixed with transactions: 251 files (3 per second)

Data:
        573.06 megabytes read (3.22 megabytes per second)
        1699.49 megabytes written (9.55 megabytes per second)

A measurable increase in performance when using HZ=250, at least in
this simple benchmark.

The question is do we need such sort of profiles as in Linux, i.e.
HZ=250 for servers and HZ=1000 for desktops.
Of course anyone can set HZ to whatever value he likes, but maybe it
should be better
if it is documented with some advisory settings for different
workloads (server/desktop).

What do you think?

P.S.: Maybe it would be interesting to see how FreeBSD compares to
Linux with equal HZ settings on the benchmark in the first post?


More information about the freebsd-performance mailing list