pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feedIDE x SAS RAID 0 on HP DL 380 G5 P400i controller performance problem
6+ messages / 4 participants
[nested] [flat]
* IDE x SAS RAID 0 on HP DL 380 G5 P400i controller performance problem
@ 2010-07-19 12:24 Daniel Ferreira de Lima <dfl.man@gmail.com>
2010-07-19 13:28 ` Re: IDE x SAS RAID 0 on HP DL 380 G5 P400i controller performance problem Kevin Grittner <Kevin.Grittner@wicourts.gov>
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Ferreira de Lima @ 2010-07-19 12:24 UTC (permalink / raw)
To: pgsql-performance
Hi people,
I have a particular performance problem under a system installed.
In the lab I have an old Microside + Dual Core machine 1GB RAM with 40gb HD
IDE and
a newer machine HP DL 380 G5 4GB RAM and 500GB SAS under RAID 0 (4 disks)
P400i Smart Array Controller.
**Both with Linux Kernel 2 .4.37.9 and Postgresql 7.2**
Under a insertion test we get a performance of 2.5 secs under 2000 inserts
(table with a single char(50) column) in the IDE disk.
And 500GB RAID 0 (4 disks!) and 37.5 secs under the same test!
I tried:
- All the postgresql.conf tuning possibles
- All the kernel tuning values possibles
- fstab mount options
- limits.conf values
- I/O tests with boonie++ that shows that P400 is superior than IDE - as
expected
- 'massive' Google search combinations without answers
- Mandriva 2009.1: result is about 12 secs (but it need to be kernel 2.4
with PGSQL 7.2)
The real case:
~100k database insertions that runs in 2 min in the IDE, against ~40 minutes
(P400i) in the HP.
The same test in the HP Blade G5 P200 controller works fine.
Thanks for any answers/analisys.
Best regards.
--
Daniel Ferreira
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: IDE x SAS RAID 0 on HP DL 380 G5 P400i controller performance problem
2010-07-19 12:24 IDE x SAS RAID 0 on HP DL 380 G5 P400i controller performance problem Daniel Ferreira de Lima <dfl.man@gmail.com>
@ 2010-07-19 13:28 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
2010-07-19 14:20 ` Re: IDE x SAS RAID 0 on HP DL 380 G5 P400i controller performance problem Daniel Ferreira de Lima <dfl.man@gmail.com>
0 siblings, 1 reply; 6+ messages in thread
From: Kevin Grittner @ 2010-07-19 13:28 UTC (permalink / raw)
To: Daniel Ferreira de Lima <dfl.man@gmail.com>; pgsql-performance
Daniel Ferreira de Lima <dfl.man@gmail.com> wrote:
> **Both with Linux Kernel 2 .4.37.9 and Postgresql 7.2**
Wow. You really need to upgrade.
> Under a insertion test we get a performance of 2.5 secs under 2000
> inserts (table with a single char(50) column) in the IDE disk.
> And 500GB RAID 0 (4 disks!) and 37.5 secs under the same test!
Is each insert in its own database transaction? (That is you've
done nothing to BEGIN a transaction, do the inserts, and then
COMMIT?) If so, you're old IDE is lying to PostgreSQL when it says
it has committed each insert. If you pull the power cord on the
computer a few times during this insert test, you'll find you wind
up missing rows which were supposedly inserted, and you will likely
have database corruption, which might render the database totally
unusable.
If you implement your RAID with a good controller which has a
battered backed-up RAM cache, and that is configured to write-back,
you'll see much better performance.
Search the archives for BBU and you'll find many other discussions
of this.
-Kevin
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: IDE x SAS RAID 0 on HP DL 380 G5 P400i controller performance problem
2010-07-19 12:24 IDE x SAS RAID 0 on HP DL 380 G5 P400i controller performance problem Daniel Ferreira de Lima <dfl.man@gmail.com>
2010-07-19 13:28 ` Re: IDE x SAS RAID 0 on HP DL 380 G5 P400i controller performance problem Kevin Grittner <Kevin.Grittner@wicourts.gov>
@ 2010-07-19 14:20 ` Daniel Ferreira de Lima <dfl.man@gmail.com>
2010-07-19 14:38 ` Re: IDE x SAS RAID 0 on HP DL 380 G5 P400i controller performance problem Greg Smith <greg@2ndquadrant.com>
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Ferreira de Lima @ 2010-07-19 14:20 UTC (permalink / raw)
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>; pgsql-performance
> > **Both with Linux Kernel 2 .4.37.9 and Postgresql 7.2**
>
> Wow. You really need to upgrade.
>
Yes, but unfortunately, actually it's impossible and economically
inviable...
> > Under a insertion test we get a performance of 2.5 secs under 2000
> > inserts (table with a single char(50) column) in the IDE disk.
> > And 500GB RAID 0 (4 disks!) and 37.5 secs under the same test!
>
> Is each insert in its own database transaction? (That is you've
> done nothing to BEGIN a transaction, do the inserts, and then
> COMMIT?) If so, you're old IDE is lying to PostgreSQL when it says
> it has committed each insert. If you pull the power cord on the
> computer a few times during this insert test, you'll find you wind
> up missing rows which were supposedly inserted, and you will likely
> have database corruption, which might render the database totally
> unusable.
>
It's a single inserts.sql with 2000 inserts.
But it's interesting test, I'll check the inserted data if it exist or not.
Maybe it's inserting only in RAM and not at disk and this nice performance
is fake.
> If you implement your RAID with a good controller which has a
> battered backed-up RAM cache, and that is configured to write-back,
> you'll see much better performance.
>
I'm working on it.. a have been seen posts in the web of people saying
things
about the BBU in P400i be disabled by default. Or problems with older
version of kernel module (cciss) turn it off by some kind of
incompatibility.
Search the archives for BBU and you'll find many other discussions
> of this.
>
> -Kevin
>
Thanks, Kevin.
--
Daniel Ferreira
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: IDE x SAS RAID 0 on HP DL 380 G5 P400i controller performance problem
2010-07-19 12:24 IDE x SAS RAID 0 on HP DL 380 G5 P400i controller performance problem Daniel Ferreira de Lima <dfl.man@gmail.com>
2010-07-19 13:28 ` Re: IDE x SAS RAID 0 on HP DL 380 G5 P400i controller performance problem Kevin Grittner <Kevin.Grittner@wicourts.gov>
2010-07-19 14:20 ` Re: IDE x SAS RAID 0 on HP DL 380 G5 P400i controller performance problem Daniel Ferreira de Lima <dfl.man@gmail.com>
@ 2010-07-19 14:38 ` Greg Smith <greg@2ndquadrant.com>
2010-07-19 19:53 ` Re: IDE x SAS RAID 0 on HP DL 380 G5 P400i controller performance problem Daniel Ferreira de Lima <dfl.man@gmail.com>
0 siblings, 1 reply; 6+ messages in thread
From: Greg Smith @ 2010-07-19 14:38 UTC (permalink / raw)
To: Daniel Ferreira de Lima <dfl.man@gmail.com>; +Cc: Kevin Grittner <Kevin.Grittner@wicourts.gov>; pgsql-performance
Daniel Ferreira de Lima wrote:
>
>
>
> > **Both with Linux Kernel 2 .4.37.9 and Postgresql 7.2**
>
> Wow. You really need to upgrade.
>
>
> Yes, but unfortunately, actually it's impossible and economically
> inviable...
Generally, getting good performance out of PostgreSQL 7.2 is also
impossible and economically inviable. You can either put resources
toward upgrading to a newer version, which will fix many of the
performance issues here, or toward changes to the old version that are
not guaranteed to actually improve anything.
That said, a look into the write-caching+BBU policy on your controller
is worthwhile. If you're running this application successfully on some
hardware but not others, that could be a source for the difference.
--
Greg Smith 2ndQuadrant US Baltimore, MD
PostgreSQL Training, Services and Support
greg@2ndQuadrant.com www.2ndQuadrant.us
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: IDE x SAS RAID 0 on HP DL 380 G5 P400i controller performance problem
2010-07-19 12:24 IDE x SAS RAID 0 on HP DL 380 G5 P400i controller performance problem Daniel Ferreira de Lima <dfl.man@gmail.com>
2010-07-19 13:28 ` Re: IDE x SAS RAID 0 on HP DL 380 G5 P400i controller performance problem Kevin Grittner <Kevin.Grittner@wicourts.gov>
2010-07-19 14:20 ` Re: IDE x SAS RAID 0 on HP DL 380 G5 P400i controller performance problem Daniel Ferreira de Lima <dfl.man@gmail.com>
2010-07-19 14:38 ` Re: IDE x SAS RAID 0 on HP DL 380 G5 P400i controller performance problem Greg Smith <greg@2ndquadrant.com>
@ 2010-07-19 19:53 ` Daniel Ferreira de Lima <dfl.man@gmail.com>
2010-07-20 22:58 ` Re: IDE x SAS RAID 0 on HP DL 380 G5 P400i controller performance problem Scott Carey <scott@richrelevance.com>
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Ferreira de Lima @ 2010-07-19 19:53 UTC (permalink / raw)
To: Greg Smith <greg@2ndquadrant.com>; +Cc: Kevin Grittner <Kevin.Grittner@wicourts.gov>; pgsql-performance
> That said, a look into the write-caching+BBU policy on your controller is
> worthwhile. If you're running this application successfully on some
> hardware but not others, that could be a source for the difference.
>
I think it's really a BBU/BBWC problem.
The tests that we made in the lab with HP Blade G5 (G6 doesn't support
kernel version 2.4) turning the battery off show us the 'same' performance
of the "pizza-box" HP DL 380 G5.. an old joke. 40 secs to 2000 insertions:
like a chariot.
We're finding the cache expansion and batteries (and.. why it's not
default???).
I think that this thread is now finished.
Thanks!
--
Daniel Ferreira
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: IDE x SAS RAID 0 on HP DL 380 G5 P400i controller performance problem
2010-07-19 12:24 IDE x SAS RAID 0 on HP DL 380 G5 P400i controller performance problem Daniel Ferreira de Lima <dfl.man@gmail.com>
2010-07-19 13:28 ` Re: IDE x SAS RAID 0 on HP DL 380 G5 P400i controller performance problem Kevin Grittner <Kevin.Grittner@wicourts.gov>
2010-07-19 14:20 ` Re: IDE x SAS RAID 0 on HP DL 380 G5 P400i controller performance problem Daniel Ferreira de Lima <dfl.man@gmail.com>
2010-07-19 14:38 ` Re: IDE x SAS RAID 0 on HP DL 380 G5 P400i controller performance problem Greg Smith <greg@2ndquadrant.com>
2010-07-19 19:53 ` Re: IDE x SAS RAID 0 on HP DL 380 G5 P400i controller performance problem Daniel Ferreira de Lima <dfl.man@gmail.com>
@ 2010-07-20 22:58 ` Scott Carey <scott@richrelevance.com>
0 siblings, 0 replies; 6+ messages in thread
From: Scott Carey @ 2010-07-20 22:58 UTC (permalink / raw)
To: Daniel Ferreira de Lima <dfl.man@gmail.com>; +Cc: Greg Smith <greg@2ndquadrant.com>; Kevin Grittner <Kevin.Grittner@wicourts.gov>; pgsql-performance
If you are using ext3, your performance on the RAID card may also improve if the postgres xlog is not on the same partition as the data. Otherwise, for every transaction commit, all of the data on the whole partition will have to be sync()'d not just the xlog.
Also, what is the performance difference between all the inserts in one script if you do:
* all your statements in the script
vs.
* first line is "BEGIN;" then all your statements, then "COMMIT;" at the end?
If these two are about the same on your old IDE drive, then your I/O stack (file system + OS + hardware) is lying to you about fsync(). The latter should be a lot faster on your RAID card if write-back caching is not on.
On Jul 19, 2010, at 12:53 PM, Daniel Ferreira de Lima wrote:
That said, a look into the write-caching+BBU policy on your controller is worthwhile. If you're running this application successfully on some hardware but not others, that could be a source for the difference.
I think it's really a BBU/BBWC problem.
The tests that we made in the lab with HP Blade G5 (G6 doesn't support kernel version 2.4) turning the battery off show us the 'same' performance of the "pizza-box" HP DL 380 G5.. an old joke. 40 secs to 2000 insertions: like a chariot.
We're finding the cache expansion and batteries (and.. why it's not default???).
I think that this thread is now finished.
Thanks!
--
Daniel Ferreira
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2010-07-20 22:58 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-07-19 12:24 IDE x SAS RAID 0 on HP DL 380 G5 P400i controller performance problem Daniel Ferreira de Lima <dfl.man@gmail.com>
2010-07-19 13:28 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
2010-07-19 14:20 ` Daniel Ferreira de Lima <dfl.man@gmail.com>
2010-07-19 14:38 ` Greg Smith <greg@2ndquadrant.com>
2010-07-19 19:53 ` Daniel Ferreira de Lima <dfl.man@gmail.com>
2010-07-20 22:58 ` Scott Carey <scott@richrelevance.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox