Re: [PERFORM] FSM - per database or per installation?

2009-12-24 Thread Craig Ringer
On 20/11/2009 2:33 AM, Heikki Linnakangas wrote: Craig James wrote: Are the FSM parameters for each database, or the entire Postgres system? In other words, if I have 100 databases, do I need to increase max_fsm_pages and max_fsm_relations by a factor of 100, or keep them the same as if I just

[PERFORM] Optimizer use of index slows down query by factor

2009-12-24 Thread Michael Ruf
Hi, we experience some strange performance problems, we've already found a workaround for us, but are curious if it's a known problem of the optimizer. Tested with the following Postgres Version: 8.2.15 and 8.3.9 AUTOVACUUM is enabled, explicit VACUUM and REINDEX both tables and the whole DB.

[PERFORM] Multicolumn index - WHERE ... ORDER BY

2009-12-24 Thread Lucas Maystre
Hi there, I've got a small question about multicolumn indexes. I have a table with ~5M rows (43 bytes per column - is that relevant?) (but eventually it could grow up to 50M rows), used to store e-mail logs. I am trying to build a web frontend to search mails in this table. I usually want

[PERFORM] SATA drives performance

2009-12-24 Thread Ognjen Blagojevic
Hi all, I'm trying to figure out which HW configuration with 3 SATA drives is the best in terms of reliability and performance for Postgres database. I'm thinking to connect two drives in RAID 0, and to keep the database (and WAL) on these disks - to improve the write performance of the SATA

[PERFORM] Performance with partitions/inheritance and multiple tables

2009-12-24 Thread Radhika S
Hi, We currently have a large table (9 million rows) of which only the last couple of days worth of data is queried on a regular basis. To improve performance we are thinking of partitioning the table. One idea is: Current_data = last days worth archive_data today (goes back to 2005) The idea

Re: [PERFORM] SATA drives performance

2009-12-24 Thread Scott Marlowe
2009/12/24 Ognjen Blagojevic ogn...@etf.bg.ac.yu: Hi all, I'm trying to figure out which HW configuration with 3 SATA drives is the best in terms of reliability and performance for Postgres database. I'm thinking to connect two drives in RAID 0, and to keep the database (and WAL) on these

Re: [PERFORM] SATA drives performance

2009-12-24 Thread Richard Neill
A couple of thoughts occur to me: 1. For reads, RAID 1 should also be good: it will allow a read to occur from whichever disk can provide the data fastest. 2. Also, for reads, the more RAM you have, the better (for caching). I'd suspect that another 8GB of RAM is a better expenditure than a 2nd

Re: [PERFORM] Optimizer use of index slows down query by factor

2009-12-24 Thread Tom Lane
Michael Ruf m...@inxmail.de writes: we experience some strange performance problems, we've already found a workaround for us, but are curious if it's a known problem of the optimizer. I think you need to see about getting this rowcount estimate to be more accurate:

Re: [PERFORM] Performance with partitions/inheritance and multiple tables

2009-12-24 Thread Shrirang Chitnis
Radhika, If the data is 9 million rows, then I would suggest that you leave it as it is, unless the server configuration and the number of users firing queries simultaneously is a matter of concern. Try creating indexes on often used fields and use EXPLAIN to speed performance of the queries

Re: [PERFORM] SATA drives performance

2009-12-24 Thread Greg Smith
Richard Neill wrote: 3. RAID 0 is twice as unreliable as no raid. I'd recommend using RAID 1 intead. If you use the Linux software mdraid, remote admin is easy. The main thing to be wary of with Linux software RAID-1 is that you configure things so that both drives are capable of booting the

Re: [PERFORM] Multicolumn index - WHERE ... ORDER BY

2009-12-24 Thread Tom Lane
Lucas Maystre l...@open.ch writes: Example of a query I might have: SELECT id FROM mail WHERE from_address LIKE 'bill%' ORDER BY time DESC LIMIT 50; The solution I had in mind was to create a multicolumn index over 'from_address' and 'time': CREATE INDEX idx_from_time ON mail

Re: [PERFORM] SATA drives performance

2009-12-24 Thread Gaël Le Mignot
Hello, Instead of using 3 disks in RAID-0 and one without RAID for archive, I would rather invest into one extra disk and have either a RAID 1+0 setup or use two disks in RAID-1 for the WAL and two disks in RAID-1 for the main database (I'm not sure which perform better between those two

Re: [PERFORM] SATA drives performance

2009-12-24 Thread Greg Smith
Gaël Le Mignot wrote: This solution costs only one extra disk (which is quite cheap nowadays) I would wager that the system being used here only has enough space to house 3 drives, thus the question, which means that adding a fourth drive probably requires buying a whole new server.

Re: [PERFORM] SATA drives performance

2009-12-24 Thread Mark Mielke
On 12/24/2009 10:51 AM, Greg Smith wrote: 7. If you have 3 equal disks, try doing some experiments. My inclination would be to set them all up with ext4... I have yet to yet a single positive thing about using ext4 for PostgreSQL. Stick with ext3, where the problems you might run into are

Re: [PERFORM] SATA drives performance

2009-12-24 Thread Greg Smith
Mark Mielke wrote: Can you be more specific? I am using ext4 without problems than I have discerned - but mostly for smaller databases (~10 databases, one almost about 1 Gbyte, most under 500 Mbytes). Every time I do hear about ext4, so far it's always in the context of something that

Re: [PERFORM] SATA drives performance

2009-12-24 Thread Richard Neill
Greg Smith wrote: Richard Neill wrote: 3. RAID 0 is twice as unreliable as no raid. I'd recommend using RAID 1 intead. If you use the Linux software mdraid, remote admin is easy. The main thing to be wary of with Linux software RAID-1 is that you configure things so that both drives are

Re: [PERFORM] SATA drives performance

2009-12-24 Thread Jeremy Harris
On 12/24/2009 05:12 PM, Richard Neill wrote: Of course, with a server machine, it's nearly impossible to use mdadm raid: you are usually compelled to use a hardware raid card. Could you expand on that? - Jeremy -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To

Re: [PERFORM] SATA drives performance

2009-12-24 Thread Richard Neill
Jeremy Harris wrote: On 12/24/2009 05:12 PM, Richard Neill wrote: Of course, with a server machine, it's nearly impossible to use mdadm raid: you are usually compelled to use a hardware raid card. Could you expand on that? Both of the last machines I bought (an IBM X3550 and an HP DL380)

Re: [PERFORM] SATA drives performance

2009-12-24 Thread Scott Marlowe
On Thu, Dec 24, 2009 at 11:09 AM, Richard Neill rn...@cam.ac.uk wrote: Jeremy Harris wrote: On 12/24/2009 05:12 PM, Richard Neill wrote: Of course, with a server machine, it's nearly impossible to use mdadm raid: you are usually compelled to use a hardware raid card. Could you expand on

Re: [PERFORM] SATA drives performance

2009-12-24 Thread Ognjen Blagojevic
Richard and others, thank you all for your answers. My comments inline. Richard Neill wrote: 2. Also, for reads, the more RAM you have, the better (for caching). I'd suspect that another 8GB of RAM is a better expenditure than a 2nd drive in many cases. The size of the RAM is already four

Re: [PERFORM] SATA drives performance

2009-12-24 Thread Adam Tauno Williams
This isn't true. IBMs IPS series controllers can the checked and configured via the ipssend utility that works very well in 2.6.x LINUX. Scott Marlowe scott.marl...@gmail.com wrote: On Thu, Dec 24, 2009 at 11:09 AM, Richard Neill rn...@cam.ac.uk wrote: Jeremy Harris wrote: On 12/24/2009

Re: [PERFORM] SATA drives performance

2009-12-24 Thread Richard Neill
Adam Tauno Williams wrote: This isn't true. IBMs IPS series controllers can the checked and configured via the ipssend utility that works very well in 2.6.x LINUX. Unfortunately, what we got (in the IBM) was the garbage ServeRaid 8kl card. This one is atrocious - it shipped with a

Re: [PERFORM] SATA drives performance

2009-12-24 Thread Scott Marlowe
On Thu, Dec 24, 2009 at 3:51 PM, Richard Neill rn...@cam.ac.uk wrote: Adam Tauno Williams wrote: This isn't true.  IBMs IPS series controllers can the checked and configured via the ipssend utility that works very well in 2.6.x LINUX. Unfortunately, what we got (in the IBM) was the

Re: [PERFORM] SATA drives performance

2009-12-24 Thread Richard Neill
Scott Marlowe wrote: On Thu, Dec 24, 2009 at 3:51 PM, Richard Neill rn...@cam.ac.uk wrote: Adam Tauno Williams wrote: This isn't true. IBMs IPS series controllers can the checked and configured via the ipssend utility that works very well in 2.6.x LINUX. Unfortunately, what we got (in

Re: [PERFORM] SATA drives performance

2009-12-24 Thread Scott Marlowe
On Thu, Dec 24, 2009 at 5:15 PM, Richard Neill rn...@cam.ac.uk wrote: Scott Marlowe wrote: On Thu, Dec 24, 2009 at 3:51 PM, Richard Neill rn...@cam.ac.uk wrote: Adam Tauno Williams wrote: This isn't true.  IBMs IPS series controllers can the checked and configured via the ipssend utility