postgresql-performance using sysbench

classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|

postgresql-performance using sysbench

kometen
Hi.

I have a HP DL360 G5 with a p800 controller with 512 bbwc and a msa70
cabinet with eight 15K rpm sas-disks in raid 1+0. I installed FreeBSD
7.0 stable and ubuntu 7.10 server using postgresql 8.2.5 (from ports
on FreeBSD and as an install-option on ubuntu). Both releases are
amd64. Postgresql on FreeBSD was compiled with WITH_THREADSAFE=true
(/var/db/ports/postgresql82/options). The server is a two x quad-core
@ 2.33 GHz with 16 GB ram.

I installed RC1 and csup'ed to latest FreeBSD 7 stable and recompiled
world and kernel. Removed options and devices I don't need like msdos,
ntfs, nfs. Ubuntu is a stock install, ie. kernel-upgrade. Kernel does
not have WITNESS etc. Then I installed and ran sysbench on postgresql
using these settings:

Postgresql.conf is the stock-configuration as created when running
initdb except I raised shared_buffers = 128MB on both FreeBSD and
Ubuntu (and raised sysctl-values as well to accomodate the larger
shared_buffers).

sysbench --test=oltp --pgsql-user=claus --oltp-table-size=100000 prepare

After that I ran sysbench using this loop:

run=5
clients=50

for ((a=10; a<=$clients; a=a+2))
do
 for ((b=1; b<=$run; b++))
 do
  psql -d sbtest -h localhost -U claus -c "vacuum analyse;"
  sysbench --test=oltp --num-threads=${a} --pgsql-user=claus
--pgsql-host="" --max-time=300 --max-requests=10000
--oltp-table-size=100000 run >> sysbench-clients-${a}
 done
done

Ubuntu 7.10:

grep "transactions:" sysbench-clients-24|sort
transactions:                        10000  (2354.49 per sec.)
transactions:                        10001  (2126.28 per sec.)
transactions:                        10001  (2215.52 per sec.)
transactions:                        10001  (2236.03 per sec.)

FreeBSD 7.0 stable as of Jan. 28'th:

grep "transactions:" sysbench-clients-24|sort
transactions:                        10001  (1600.36 per sec.)
transactions:                        10002  (1963.95 per sec.)
transactions:                        10005  (1973.17 per sec.)

In other runs FreeBSD also seems to trail Ubuntu. Are there any knobs
I could try on FreeBSD?

--
regards
Claus

When lenity and cruelty play for a kingdom,
the gentlest gamester is the soonest winner.

Shakespeare
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: postgresql-performance using sysbench

Ivan Voras
Claus Guttesen wrote:

> Ubuntu 7.10:
>
> grep "transactions:" sysbench-clients-24|sort
> transactions:                        10000  (2354.49 per sec.)
> transactions:                        10001  (2126.28 per sec.)
> transactions:                        10001  (2215.52 per sec.)
> transactions:                        10001  (2236.03 per sec.)
>
> FreeBSD 7.0 stable as of Jan. 28'th:
>
> grep "transactions:" sysbench-clients-24|sort
> transactions:                        10001  (1600.36 per sec.)
> transactions:                        10002  (1963.95 per sec.)
> transactions:                        10005  (1973.17 per sec.)
>
> In other runs FreeBSD also seems to trail Ubuntu. Are there any knobs
> I could try on FreeBSD?
I think the excellent results Kris got with FreeBSD were significantly
helped by patching postgresql to remove setproctitle(). Other than that,
  from the sysbench line I see this is OLTP benchmark which should mean
a lot of write transactions, and I've consistently seen much better file
system write performance on Linux than on FreeBSD. No tuning can help here.



signature.asc (258 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: postgresql-performance using sysbench

Darcy Buskermolen-2
On Monday 28 January 2008 09:25:13 Ivan Voras wrote:

> Claus Guttesen wrote:
> > Ubuntu 7.10:
> >
> > grep "transactions:" sysbench-clients-24|sort
> > transactions:                        10000  (2354.49 per sec.)
> > transactions:                        10001  (2126.28 per sec.)
> > transactions:                        10001  (2215.52 per sec.)
> > transactions:                        10001  (2236.03 per sec.)
> >
> > FreeBSD 7.0 stable as of Jan. 28'th:
> >
> > grep "transactions:" sysbench-clients-24|sort
> > transactions:                        10001  (1600.36 per sec.)
> > transactions:                        10002  (1963.95 per sec.)
> > transactions:                        10005  (1973.17 per sec.)
> >
> > In other runs FreeBSD also seems to trail Ubuntu. Are there any knobs
> > I could try on FreeBSD?
>
> I think the excellent results Kris got with FreeBSD were significantly
> helped by patching postgresql to remove setproctitle().

You don;t need to patch postgresql for that, all you need to do is turn that
off.

update_process_title = off in postgresql.conf and then restart the daemon.

> Other than that,
>   from the sysbench line I see this is OLTP benchmark which should mean
> a lot of write transactions, and I've consistently seen much better file
> system write performance on Linux than on FreeBSD. No tuning can help here.



--
Darcy Buskermolen
Command Prompt, Inc.
+1.503.667.4564 X 102
http://www.commandprompt.com/
PostgreSQL solutions since 1997
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: postgresql-performance using sysbench

kometen
> > > Ubuntu 7.10:
> > >
> > > grep "transactions:" sysbench-clients-24|sort
> > > transactions:                        10000  (2354.49 per sec.)
> > > transactions:                        10001  (2126.28 per sec.)
> > > transactions:                        10001  (2215.52 per sec.)
> > > transactions:                        10001  (2236.03 per sec.)
> > >
> > > FreeBSD 7.0 stable as of Jan. 28'th:
> > >
> > > grep "transactions:" sysbench-clients-24|sort
> > > transactions:                        10001  (1600.36 per sec.)
> > > transactions:                        10002  (1963.95 per sec.)
> > > transactions:                        10005  (1973.17 per sec.)
> > >
> > > In other runs FreeBSD also seems to trail Ubuntu. Are there any knobs
> > > I could try on FreeBSD?
> >
> > I think the excellent results Kris got with FreeBSD were significantly
> > helped by patching postgresql to remove setproctitle().
>
> You don;t need to patch postgresql for that, all you need to do is turn that
> off.
>
> update_process_title = off in postgresql.conf and then restart the daemon.

I found the setting and set it to off but no real difference in performance.

> >   from the sysbench line I see this is OLTP benchmark which should mean
> > a lot of write transactions, and I've consistently seen much better file
> > system write performance on Linux than on FreeBSD. No tuning can help here.

Yes, that is correct. I wanted to conduct a r/w test. But if it's down
to the fs itself I will just leave it atm. I will probably deploy the
server on FreeBSD anyway since we probably won't reach that many
writes in the foreseable future and FreeBSD is what I do best.

Will zfs be able to achieve better performance? I guess that ufs2 will
remain more or less in the state it is in now.

--
regards
Claus

When lenity and cruelty play for a kingdom,
the gentlest gamester is the soonest winner.

Shakespeare
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: postgresql-performance using sysbench

Kris Kennaway-3
Claus Guttesen wrote:

>>>> Ubuntu 7.10:
>>>>
>>>> grep "transactions:" sysbench-clients-24|sort
>>>> transactions:                        10000  (2354.49 per sec.)
>>>> transactions:                        10001  (2126.28 per sec.)
>>>> transactions:                        10001  (2215.52 per sec.)
>>>> transactions:                        10001  (2236.03 per sec.)
>>>>
>>>> FreeBSD 7.0 stable as of Jan. 28'th:
>>>>
>>>> grep "transactions:" sysbench-clients-24|sort
>>>> transactions:                        10001  (1600.36 per sec.)
>>>> transactions:                        10002  (1963.95 per sec.)
>>>> transactions:                        10005  (1973.17 per sec.)
>>>>
>>>> In other runs FreeBSD also seems to trail Ubuntu. Are there any knobs
>>>> I could try on FreeBSD?
>>> I think the excellent results Kris got with FreeBSD were significantly
>>> helped by patching postgresql to remove setproctitle().
>> You don;t need to patch postgresql for that, all you need to do is turn that
>> off.
>>
>> update_process_title = off in postgresql.conf and then restart the daemon.
>
> I found the setting and set it to off but no real difference in performance.
>
>>>   from the sysbench line I see this is OLTP benchmark which should mean
>>> a lot of write transactions, and I've consistently seen much better file
>>> system write performance on Linux than on FreeBSD. No tuning can help here.
>
> Yes, that is correct. I wanted to conduct a r/w test. But if it's down
> to the fs itself I will just leave it atm. I will probably deploy the
> server on FreeBSD anyway since we probably won't reach that many
> writes in the foreseable future and FreeBSD is what I do best.
>
> Will zfs be able to achieve better performance? I guess that ufs2 will
> remain more or less in the state it is in now.
>

I went through this in detail in a thread on -stable recently (Subject:
Performance!).  Rather than me going over all of this again, can you
please read that thread in detail and get back to me once you have
applied all of the discussion there to your case.

Kris

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: postgresql-performance using sysbench

kometen
> >>>> Ubuntu 7.10:
> >>>>
> >>>> grep "transactions:" sysbench-clients-24|sort
> >>>> transactions:                        10000  (2354.49 per sec.)
> >>>> transactions:                        10001  (2126.28 per sec.)
> >>>> transactions:                        10001  (2215.52 per sec.)
> >>>> transactions:                        10001  (2236.03 per sec.)
> >>>>
> >>>> FreeBSD 7.0 stable as of Jan. 28'th:
> >>>>
> >>>> grep "transactions:" sysbench-clients-24|sort
> >>>> transactions:                        10001  (1600.36 per sec.)
> >>>> transactions:                        10002  (1963.95 per sec.)
> >>>> transactions:                        10005  (1973.17 per sec.)
> >>>>
> >>>> In other runs FreeBSD also seems to trail Ubuntu. Are there any knobs
> >>>> I could try on FreeBSD?
> >>> I think the excellent results Kris got with FreeBSD were significantly
> >>> helped by patching postgresql to remove setproctitle().
> >> You don;t need to patch postgresql for that, all you need to do is turn that
> >> off.
> >>
> >> update_process_title = off in postgresql.conf and then restart the daemon.
> >
> > I found the setting and set it to off but no real difference in performance.
> >
> >>>   from the sysbench line I see this is OLTP benchmark which should mean
> >>> a lot of write transactions, and I've consistently seen much better file
> >>> system write performance on Linux than on FreeBSD. No tuning can help here.
> >
> > Yes, that is correct. I wanted to conduct a r/w test. But if it's down
> > to the fs itself I will just leave it atm. I will probably deploy the
> > server on FreeBSD anyway since we probably won't reach that many
> > writes in the foreseable future and FreeBSD is what I do best.
> >
> > Will zfs be able to achieve better performance? I guess that ufs2 will
> > remain more or less in the state it is in now.

I wouldn't deploy zfs on a prod. db-server so this is just to hear if
some had tried zfs (with compression enabled).

>
> I went through this in detail in a thread on -stable recently (Subject:
> Performance!).  Rather than me going over all of this again, can you
> please read that thread in detail and get back to me once you have
> applied all of the discussion there to your case.

I had (allready) saved the thread in my mail-account so I could look
it up before I started testing. :-) So I compiled postgresql with the
option WITH_THREADSAFE=true and used sysbench with --pgsql-host="" .
As pointed out by Ivan my test also involved r/w whereas the thread
you (probably) mention at
http://groups.google.com/group/mailing.freebsd.stable/browse_thread/thread/e224cd4f76e9ec2d
is a read-only test.

I forgot to mention in my first post that I'm using ULE. The p800
controller has a (factory set) 25/75 read/write cache ratio.

--
regards
Claus

When lenity and cruelty play for a kingdom,
the gentlest gamester is the soonest winner.

Shakespeare
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: postgresql-performance using sysbench

Ivan Voras
> I had (allready) saved the thread in my mail-account so I could look
> it up before I started testing. :-) So I compiled postgresql with the
> option WITH_THREADSAFE=3Dtrue and used sysbench with --pgsql-host=3D"" =
=2E
> As pointed out by Ivan my test also involved r/w whereas the thread
> you (probably) mention at
> http://groups.google.com/group/mailing.freebsd.stable/browse_thread/thr=
ead/e224cd4f76e9ec2d
> is a read-only test.
>=20
> I forgot to mention in my first post that I'm using ULE. The p800
> controller has a (factory set) 25/75 read/write cache ratio.

There's maybe one additional thing: do you dual-boot Linux and FreeBSD?
If so, you'll need to set up a separate additional partition for the
database, instead of benchmarking it with the file systems used by the
OS, because different areas of the drive(s) have different performance -
you can verify this with diskinfo -t.



signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: postgresql-performance using sysbench

kometen
> > I forgot to mention in my first post that I'm using ULE. The p800
> > controller has a (factory set) 25/75 read/write cache ratio.
>
> There's maybe one additional thing: do you dual-boot Linux and FreeBSD?
> If so, you'll need to set up a separate additional partition for the
> database, instead of benchmarking it with the file systems used by the
> OS, because different areas of the drive(s) have different performance -
> you can verify this with diskinfo -t.

I installed FreeBSD onto a boot-partition (p400i-controller) and used
the external storage (p800) as database-partition (eight 15K rpm
sas-disks in raid 1+0). Same with Ubuntu. When I re-installed FreeBSD
and ubuntu I wiped and formatted the previous partitions. Ubuntu used
ext3 which I guess is default fs.

--
regards
Claus

When lenity and cruelty play for a kingdom,
the gentlest gamester is the soonest winner.

Shakespeare
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: postgresql-performance using sysbench

mdtancsa
In reply to this post by kometen
At 03:46 PM 1/28/2008, Claus Guttesen wrote:

>I had (allready) saved the thread in my mail-account so I could look
>it up before I started testing. :-) So I compiled postgresql with the
>option WITH_THREADSAFE=true and used sysbench with --pgsql-host="" .
>As pointed out by Ivan my test also involved r/w whereas the thread
>you (probably) mention at
>http://groups.google.com/group/mailing.freebsd.stable/browse_thread/thread/e224cd4f76e9ec2d
>is a read-only test.
>
>I forgot to mention in my first post that I'm using ULE. The p800
>controller has a (factory set) 25/75 read/write cache ratio.


I am still going through my own testing.  One thing I noticed, on a
4G RAM machine (still waiting for the RAM to test with 8G), the disks
are not that busy.  It seems to be the CPU that is the bottleneck on
FreeBSD.  I tried the test with 900,000 rows instead.

  procs      memory      page                    disks     faults      cpu
  r b w     avm    fre   flt  re  pi  po    fr  sr ad5
da0   in   sy   cs us sy id
38 1 0  271024 3439656  6329   0   0   0     4   0   0 1703 1709
120725 41505 44 18 37
  0 38 0  271024 3438860  9590   0   0   0     8   0   0 1932 1938
183844 47958 70 28  3
  6 33 0  271024 3438120  7814   0   0   0     0   0   0 1823 1827
169969 44914 62 25 13
39 0 0  271024 3437960  1530   0   0   0     0   0   0 994  998 36521
14927 13  8 79
38 1 0  271024 3437244  7374   0   0   0     0   0   0 2724 2731
173493 51821 71 20  9
  0 39 0  271024 3436620  4773   0   0   0     8   0   0 2727 2734
125699 39962 47 20 33
37 1 0  271024 3435836  6884   0   0   0     8   0   0 2796 2804
177453 58430 70 26  4

I am also using ULE, pgsql with WITH_THREADSAFE=true and not using
TCP to connect.  How busy were your disks in your testing ?

         ---Mike


_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: postgresql-performance using sysbench

kometen
> >I had (allready) saved the thread in my mail-account so I could look
> >it up before I started testing. :-) So I compiled postgresql with the
> >option WITH_THREADSAFE=true and used sysbench with --pgsql-host="" .
> >As pointed out by Ivan my test also involved r/w whereas the thread
> >you (probably) mention at
> >http://groups.google.com/group/mailing.freebsd.stable/browse_thread/thread/e224cd4f76e9ec2d
> >is a read-only test.
> >
> >I forgot to mention in my first post that I'm using ULE. The p800
> >controller has a (factory set) 25/75 read/write cache ratio.
>
>
> I am still going through my own testing.  One thing I noticed, on a
> 4G RAM machine (still waiting for the RAM to test with 8G), the disks
> are not that busy.  It seems to be the CPU that is the bottleneck on
> FreeBSD.  I tried the test with 900,000 rows instead.
>
>   procs      memory      page                    disks     faults      cpu
>   r b w     avm    fre   flt  re  pi  po    fr  sr ad5
> da0   in   sy   cs us sy id
> 38 1 0  271024 3439656  6329   0   0   0     4   0   0 1703 1709
> 120725 41505 44 18 37
>   0 38 0  271024 3438860  9590   0   0   0     8   0   0 1932 1938
> 183844 47958 70 28  3
>   6 33 0  271024 3438120  7814   0   0   0     0   0   0 1823 1827
> 169969 44914 62 25 13
> 39 0 0  271024 3437960  1530   0   0   0     0   0   0 994  998 36521
> 14927 13  8 79
> 38 1 0  271024 3437244  7374   0   0   0     0   0   0 2724 2731
> 173493 51821 71 20  9
>   0 39 0  271024 3436620  4773   0   0   0     8   0   0 2727 2734
> 125699 39962 47 20 33
> 37 1 0  271024 3435836  6884   0   0   0     8   0   0 2796 2804
> 177453 58430 70 26  4
>
> I am also using ULE, pgsql with WITH_THREADSAFE=true and not using
> TCP to connect.  How busy were your disks in your testing ?

Approx. 15-25 MB with spikes at approx. 45-50 MB. Context-swithces
were sometimes 140.000 with 20-30 clients (systat -vmstat 1).

--
regards
Claus

When lenity and cruelty play for a kingdom,
the gentlest gamester is the soonest winner.

Shakespeare
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: postgresql-performance using sysbench

Mark Kirkwood
In reply to this post by mdtancsa
Mike Tancsa wrote:

> At 03:46 PM 1/28/2008, Claus Guttesen wrote:
>
>> I had (allready) saved the thread in my mail-account so I could look
>> it up before I started testing. :-) So I compiled postgresql with the
>> option WITH_THREADSAFE=true and used sysbench with --pgsql-host="" .
>> As pointed out by Ivan my test also involved r/w whereas the thread
>> you (probably) mention at
>> http://groups.google.com/group/mailing.freebsd.stable/browse_thread/thread/e224cd4f76e9ec2d 
>>
>> is a read-only test.
>>
>> I forgot to mention in my first post that I'm using ULE. The p800
>> controller has a (factory set) 25/75 read/write cache ratio.
>
>
> I am still going through my own testing.  One thing I noticed, on a 4G
> RAM machine (still waiting for the RAM to test with 8G), the disks are
> not that busy.  It seems to be the CPU that is the bottleneck on
> FreeBSD.  I tried the test with 900,000 rows instead.
>
>  procs      memory      page                    disks     faults      cpu
>  r b w     avm    fre   flt  re  pi  po    fr  sr ad5 da0   in   sy  
> cs us sy id
> 38 1 0  271024 3439656  6329   0   0   0     4   0   0 1703 1709
> 120725 41505 44 18 37
>  0 38 0  271024 3438860  9590   0   0   0     8   0   0 1932 1938
> 183844 47958 70 28  3
>  6 33 0  271024 3438120  7814   0   0   0     0   0   0 1823 1827
> 169969 44914 62 25 13
> 39 0 0  271024 3437960  1530   0   0   0     0   0   0 994  998 36521
> 14927 13  8 79
> 38 1 0  271024 3437244  7374   0   0   0     0   0   0 2724 2731
> 173493 51821 71 20  9
>  0 39 0  271024 3436620  4773   0   0   0     8   0   0 2727 2734
> 125699 39962 47 20 33
> 37 1 0  271024 3435836  6884   0   0   0     8   0   0 2796 2804
> 177453 58430 70 26  4
>
> I am also using ULE, pgsql with WITH_THREADSAFE=true and not using TCP
> to connect.  How busy were your disks in your testing ?

Something else it may be worth noting - currently Linux 2.6 kernels are
measurably faster at reading cached file pages compared to Freebsd (6 or
7) - by a factor of about 1.5 to 2 times (see thread titled "cached file
read performance"), and in this sort of oltp benchmark, you may be
running into this effect frequently enough to be impacting your results.

regards

Mark
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: postgresql-performance using sysbench

Kris Kennaway-3
In reply to this post by kometen
Claus Guttesen wrote:

>>> I forgot to mention in my first post that I'm using ULE. The p800
>>> controller has a (factory set) 25/75 read/write cache ratio.
>> There's maybe one additional thing: do you dual-boot Linux and FreeBSD?
>> If so, you'll need to set up a separate additional partition for the
>> database, instead of benchmarking it with the file systems used by the
>> OS, because different areas of the drive(s) have different performance -
>> you can verify this with diskinfo -t.
>
> I installed FreeBSD onto a boot-partition (p400i-controller) and used
> the external storage (p800) as database-partition (eight 15K rpm
> sas-disks in raid 1+0). Same with Ubuntu. When I re-installed FreeBSD
> and ubuntu I wiped and formatted the previous partitions. Ubuntu used
> ext3 which I guess is default fs.

Write performance is something that we are working on, expect to hear
about progress over the coming weeks/months.

Kris
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: postgresql-performance using sysbench

Ivan Voras
Kris Kennaway wrote:

> Write performance is something that we are working on, expect to hear
> about progress over the coming weeks/months.

Do you have some notes or descriptions about what is being worked on?
I'm currently doing some file system benchmarking for internal purposes
and I'm seeing sequential read/write performance nontrivially lower on
FreeBSD+UFS than on Linux+ext3. The Linux combination has ~~20% faster
writes and ~~60% faster reads, on a hardware RAID10 of four 15kRPM
drives, IBM ServeRAID 8 (file system ops / nonsequential are worse -
send me a private message for details). Is the work that's been going on
about lock contention or something at the low levels of the file system?


signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: postgresql-performance using sysbench

Kris Kennaway-3
Ivan Voras wrote:

> Kris Kennaway wrote:
>
>> Write performance is something that we are working on, expect to hear
>> about progress over the coming weeks/months.
>
> Do you have some notes or descriptions about what is being worked on?
> I'm currently doing some file system benchmarking for internal purposes
> and I'm seeing sequential read/write performance nontrivially lower on
> FreeBSD+UFS than on Linux+ext3. The Linux combination has ~~20% faster
> writes and ~~60% faster reads, on a hardware RAID10 of four 15kRPM
> drives, IBM ServeRAID 8 (file system ops / nonsequential are worse -
> send me a private message for details). Is the work that's been going on
> about lock contention or something at the low levels of the file system?
>

Rewrite of the lockmgr primitive, for starters.  Then we'll see what
remains.

Kris

_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: postgresql-performance using sysbench

Ivan Voras
On 30/01/2008, Kris Kennaway <[hidden email]> 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.
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: postgresql-performance using sysbench

Nikolay Denev-2
On Jan 30, 2008 9:57 PM, Ivan Voras <[hidden email]> wrote:
> On 30/01/2008, Kris Kennaway <[hidden email]> 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?
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: postgresql-performance using sysbench

Ivan Voras
Niki Denev wrote:

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

> What do you think?

This is a very low result :) I don't know your machine or the parameters
you used with postmark but even FreeBSD on two striped 7.5 kRPM drives
can achieve ~~ 110 tps (so ~~ 50 for a single drive). In the same
circumstances and with the right file system - reiserfs in this case -
Linux can achieve close to 900 tps (170 tps with ext3). This is the kind
of difference I am talking about. A change of 4 tps to 6 tps is not
generally useful.





signature.asc (258 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: postgresql-performance using sysbench

Niki Denev
On Jan 31, 2008 10:16 PM, Ivan Voras <[hidden email]> wrote:

> Niki Denev wrote:
>
> > HZ=1000
> > Time:
> >         239 seconds total
> >         122 seconds of transactions (4 per second)
>
> > What do you think?
>
> This is a very low result :) I don't know your machine or the parameters
> you used with postmark but even FreeBSD on two striped 7.5 kRPM drives
> can achieve ~~ 110 tps (so ~~ 50 for a single drive). In the same
> circumstances and with the right file system - reiserfs in this case -
> Linux can achieve close to 900 tps (170 tps with ext3). This is the kind
> of difference I am talking about. A change of 4 tps to 6 tps is not
> generally useful.
>
>

What settings are you using for postmark?
I ran postmark with default settings, and only changed "size" to "4096
4096000", so it could create
files varying in size from 4K to 3.9M
The machine is dualcore core2duo and has two 10Krpm scsi disks in
geom_mirror and geom_journal on top of them.
I guess that this may be because of geom_journal performance penalty,
having to write everything two times.

Ubench too shows no significant difference, although its not using
disk subsystem at all.

HZ=250
Ubench CPU:   322604
Ubench MEM:   152835
--------------------
Ubench AVG:   237719

HZ=1000
Ubench CPU:   321800
Ubench MEM:   152807
--------------------
Ubench AVG:   237303

Maybe i'll try also "bonnie++"
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: postgresql-performance using sysbench

Ivan Voras
On 31/01/2008, Niki Denev <[hidden email]> wrote:

> On Jan 31, 2008 10:16 PM, Ivan Voras <[hidden email]> wrote:
> > Niki Denev wrote:
> >
> > > HZ=1000
> > > Time:
> > >         239 seconds total
> > >         122 seconds of transactions (4 per second)
> >
> > > What do you think?
> >
> > This is a very low result :) I don't know your machine or the parameters
> > you used with postmark but even FreeBSD on two striped 7.5 kRPM drives
> > can achieve ~~ 110 tps (so ~~ 50 for a single drive). In the same
> > circumstances and with the right file system - reiserfs in this case -
> > Linux can achieve close to 900 tps (170 tps with ext3). This is the kind
> > of difference I am talking about. A change of 4 tps to 6 tps is not
> > generally useful.
> >
> >
>
> What settings are you using for postmark?
> I ran postmark with default settings, and only changed "size" to "4096
> 4096000", so it could create
> files varying in size from 4K to 3.9M

Ok, under these circumstances+gjournal it's maybe possible to get
numbers that low. I am testing operations on small files so my whole
configuration is:

set size 4096 65536
set read 8192
set write 8192
set number 10000
set transactions 40000
set subdirectories 1000
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: postgresql-performance using sysbench

kometen
In reply to this post by Nikolay Denev-2
> 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.

I'm doing some db-imports on postgresql on a file which takes 3 hours
and 40 min. with default HZ (1000). Then I changed HZ to 250 (in
loader.conf) and rebooted. The import still took 3 h. 40 min. so
altering HZ does not seem to have any influence.

#>sysctl kern.clockrate
kern.clockrate: { hz = 250, tick = 4000, profhz = 166, stathz = 33 }

--
regards
Claus

When lenity and cruelty play for a kingdom,
the gentlest gamester is the soonest winner.

Shakespeare
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "[hidden email]"
12