This discussion is archived
6 Replies Latest reply: Aug 4, 2010 9:07 PM by 807559 RSS

solaris 9 slow withp postgresql 8.4.4

807559 Newbie
Currently Being Moderated
Hi


I have installed postgres 8.4.4 (libxml and plperl)on a Sun Microsystems sun4u Sun Fire 880 with:

- 4 700Mhz processors
- 8 Gb Ram
- System 9 operSolaris
- 64-bit sparcv9 Applications
- 32-bit sparc Applications
- SCSI-3. Discs do not have any arrangement

It was compiled with the sun-studio (flag-bit X05 and 32 bits ....) ... i
follow the recommendations from:

http://www.postgresql.org/docs/8.4/static/installation-platform-notes.html # INSTALLATION-NOTES-SOLARIS

Also I have installed postgres (8.4.2) on a PC (Dell Optiplex 960) with the
next characteristics:

- 3 Gb ram
- 1 processor of 3.2 Ghz Dual Core
- A hard SATAS
- 06/02/1928 Linux (gentoo)


We design some performance tests (special for my application); this test was
executed with pgbench:

pgbench -c 5 -T 600 -n -U aeedc -f test.sql aeespc

The results was the next:

on pc :

Thu July 29 15:50:02 CDT 2010
transaction type: Custom query
scaling factor: 1
query mode: simple
number of clients: 5
duration: 120 s
Actually number of Transactions processed: 159
tps = 1.302670 (Including Establishing connections)
tps = 1.302746 (excluding Establishing connections)
Thu July 29 15:52:04 CDT 2010


on Solaris:

Mon July 26 18:41:58 CDT 2010
transaction type: Custom query
scaling factor: 1
query mode: simple
number of clients: 5
duration: 120 s
Actually number of Transactions processed: 85
tps = 0.668752 (Including Establishing connections)
tps = 0.669172 (excluding Establishing connections)
Mon July 26 18:44:05 CDT 2010



As observed, is much slower solaris.


I also see the difference in disk access. For example iostat throws in the pc (filter some columns)


device r/s w/s rKB/s wKB/s await %util
sda 0.12 3.62 8.24 45.85 6.06 0.16
sda 0 2.2 0 126.4 0.64 0.08
sda 0 0.8 0 8 0 0
sda 0 1.6 0 31.2 0.12 0.02
sda 0 1.2 0 8.8 0.17 0.02
sda 0 1.8 0 36 0.11 0.02
sda 0 1 0 5.6 0.6 0.06

and on Solaris:

r/s w/s kr/s kw/s wait wsvc_t asvc_t %w %b
c1t0d0 0.1 2.8 2.5 25.3 0.1 27.8 22.8 0 2
c1t0d0 0 4.8 0 36.8 0 0 5.8 0 3
c1t0d0 0 10.8 0 92.8 0 0 8 0 6
c1t0d0 0 12.2 0 97.6 1.2 99.8 77.6 5 7

it is also slower solaris ...

I made the following "tunnings" in solaris without managing to improve the performance:


http://blogs.sun.com/jkshah/entry/best_practices_with_postgresql_8

http://archives.postgresql.org/pgsql-performance/2006-02/msg00190.php

http://vnull.pcnet.com.pl/dl/postgresql/pgsol_best_practices.pdf



My questions

- are there another way to improve the performance of solaris? where can i
read more?

- the PC (with linux) have better performance than SUN (solaris).... therefore
never going to get better performance ... what do you think about it?






Greetings and thanks in advance.
  • 1. Re: solaris 9 slow withp postgresql 8.4.4
    abrante Pro
    Currently Being Moderated
    I think that comparing the performance between a system which can operate at 3.2GHz v.s. one which can operates at 700MHz (even if it can do 4 things simultaneously) is not in anyway a relevant test.

    A more relevant test would be to install Solaris X86 on the PC and measure the speed on that installation, that would give you a better comparison.

    Having said that, i think the performance numbers are surprisingly good for the V880, give that its being compared with much newer and faster hardware.

    .7/M.
  • 2. Re: solaris 9 slow withp postgresql 8.4.4
    807559 Newbie
    Currently Being Moderated
    Sorry, maybe explain bad my problem.

    I need to migrate my database from PC to Sun ... and i try to have the same performance.....

    I suppose I'll ever get similar performances because the technology of PC is more recent than SUN ....

    I have to do all this to justify buying a new server



    thanks for you answer
  • 3. Re: solaris 9 slow withp postgresql 8.4.4
    abrante Pro
    Currently Being Moderated
    Ok.

    I don't think there are any magic tricks we can do here to drastically improve the performance of PostreSQL on the Solaris 9 machine.

    You could verify that the machine has enough memory to serve the postresql, so that it doesn't have to swap (i.e. check it in 'top').

    If you have unused disks, you could mirror the disk, that way you would write to two disks simultaneously which could benefit the performance.

    An upgrade to Solaris 10 might (or might not) help.

    .7/M.
  • 4. Re: solaris 9 slow withp postgresql 8.4.4
    807559 Newbie
    Currently Being Moderated
    ok ... thanks to all


    see you!!
  • 5. Re: solaris 9 slow withp postgresql 8.4.4
    Robert Cohen Newbie
    Currently Being Moderated
    The benchmark appears to be fairly write heavy. So mirroring isnt going to help much as mirroring only speeds up reads.
    So to make it faster you'd have to go for striping not mirroring.

    Of couse, the disks in the older server are probably quite a lot slower than the disks in the linux box.
    You should do some benchmarking in something like iozone or bonnie++ to compare.

    Chances are your already getting the same proportion of the disk performance anyway.
  • 6. Re: solaris 9 slow withp postgresql 8.4.4
    807559 Newbie
    Currently Being Moderated
    thanks Robert .... see you