Re: [PERFORM] index file bloating still in 7.4 ?

2003-10-21 Thread Andrew Sullivan
On Mon, Oct 20, 2003 at 05:42:52PM -0400, Tom Lane wrote: > hold of these dead rows instead of recycling them. I suspect you have > a client process somewhere that is holding an open transaction for a > long time ... probably not doing anything, just sitting there with an > unclosed BEGIN ... Wh

Re: [PERFORM] Performance weirdness with/without vacuum analyze

2003-10-21 Thread Harry Broomhall
Josh Berkus writes: > Harry, Many thanks for your response, > > >It has been suggested to me that I resubmit this question to this list, > > rather than the GENERAL list it was originaly sent to. > > > >I asked earlier about ways of doing an UPDATE involving a left outer > > join and

Re: [PERFORM] Performance weirdness with/without vacuum analyze

2003-10-21 Thread Shridhar Daithankar
Harry Broomhall wrote: > #effective_cache_size = 1000# typically 8KB each > #random_page_cost = 4 # units are one sequential page fetch cost You must tune the first one at least. Try http://www.varlena.com/varlena/GeneralBits/Tidbits/perf.html to tune these parameters. >>2) The EXPLAIN

Re: [PERFORM] index file bloating still in 7.4 ?

2003-10-21 Thread Gaetano Mendola
Andrew Sullivan wrote: On Mon, Oct 20, 2003 at 05:42:52PM -0400, Tom Lane wrote: hold of these dead rows instead of recycling them. I suspect you have a client process somewhere that is holding an open transaction for a long time ... probably not doing anything, just sitting there with an unclos

Re: [PERFORM] Performance weirdness with/without vacuum analyze

2003-10-21 Thread Harry Broomhall
Shridhar Daithankar writes: > Harry Broomhall wrote: > > #effective_cache_size = 1000# typically 8KB each > > #random_page_cost = 4 # units are one sequential page fetch cost > > You must tune the first one at least. Try > http://www.varlena.com/varlena/GeneralBits/Tidbits/perf.html t

Re: [PERFORM] PostgreSQL data on a NAS device ?

2003-10-21 Thread Alexander Priem
The machine is going to be used for a pretty large database (well over 100 tables with some of them containing over a million records from the start, number of tables and records will grow (much?) larger in the future). This database is going to be used by a pretty large number of employees. The nu

Re: [PERFORM] PostgreSQL data on a NAS device ?

2003-10-21 Thread Shridhar Daithankar
Alexander Priem wrote: Dell PowerEdge 1750 machine with Intel Xeon CPU at 3 GHz and 4 GB of RAM. This machine will contain a PERC4/Di RAID controller with 128MB of battery backed cache memory. The O/S and logfiles will be placed on a RAID-1 setup of two 36Gb SCSI-U320 drives (15.000rpm). Database d

Re: [PERFORM] PostgreSQL data on a NAS device ?

2003-10-21 Thread Alexander Priem
I have considered Opteron, yes. But I think there are too many uncertainties, like : * It's a new CPU that has not proven itself yet. * I don't think I can buy directly from IBM (according to their site), so how about support (24x7) ? This will be very important to our client. * I need to install

Re: [PERFORM] PostgreSQL data on a NAS device ?

2003-10-21 Thread Geoffrey
Alexander Priem wrote: I have considered Opteron, yes. But I think there are too many uncertainties, like : * It's a new CPU that has not proven itself yet. * I don't think I can buy directly from IBM (according to their site), so how about support (24x7) ? This will be very important to our client

Re: [PERFORM] Performance weirdness with/without vacuum analyze

2003-10-21 Thread Harry Broomhall
Shridhar Daithankar writes: First - many thanks for your suggestions and pointers to further info. I have been trying some of them with some interesting results! > Harry Broomhall wrote: > > #effective_cache_size = 1000# typically 8KB each > > #random_page_cost = 4 # units are on

Re: [PERFORM] SRFs ... no performance penalty?

2003-10-21 Thread Robert Treat
On Mon, 2003-10-20 at 20:55, Josh Berkus wrote: > Folks, > > I'm working on the demo session for our upcoming presentation at PHPCon. > > As a side issue, we ended up comparing 3 versions of the same search screen: > > 1) All in PHP with views; > 2) Using a function to build a query and count

[PERFORM] Tuning for mid-size server

2003-10-21 Thread Anjan Dave
Title: Tuning for mid-size server Hi, Pretty soon, a PowerEdge 6650 with 4 x 2Ghz XEONs, and 8GB Memory, with internal drives on RAID5 will be delivered. Postgres will be from RH8.0. I am planning for these values for the postgres configuration - to begin with: Shared_buffers (25% of RAM

Re: [PERFORM] PostgreSQL data on a NAS device ?

2003-10-21 Thread scott.marlowe
On Tue, 21 Oct 2003, Alexander Priem wrote: > The machine is going to be used for a pretty large database (well over 100 > tables with some of them containing over a million records from the start, > number of tables and records will grow (much?) larger in the future). This > database is going to

Re: [PERFORM] Tuning for mid-size server

2003-10-21 Thread Richard Huxton
On Tuesday 21 October 2003 15:28, Anjan Dave wrote: > Hi, > > Pretty soon, a PowerEdge 6650 with 4 x 2Ghz XEONs, and 8GB Memory, with > internal drives on RAID5 will be delivered. Postgres will be from RH8.0. You'll want to upgrade PG to v7.3.4 > I am planning for these values for the postgres co

Re: [PERFORM] Tuning for mid-size server

2003-10-21 Thread Josh Berkus
Anjan, > Pretty soon, a PowerEdge 6650 with 4 x 2Ghz XEONs, and 8GB Memory, with > internal drives on RAID5 will be delivered. Postgres will be from RH8.0. How many drives? RAID5 sucks for heavy read-write databases, unless you have 5+ drives. Or a large battery-backed cache. Also, last I ch

Re: [PERFORM] SRFs ... no performance penalty?

2003-10-21 Thread Josh Berkus
Robert, > > 1) 0.19687 seconds > > 2) 0.20667 seconds > > 3) 0.20594 seconds > > Is this measuring time in the back-end or total time of script > execution? Total time of execution, e.g. from clicking the "enter" button to displaying the list of matches. Any other comparison would be misleading

Re: [PERFORM] index file bloating still in 7.4 ?

2003-10-21 Thread Seum-Lim Gan
Hi Tom, 1.) OK. We have narrowed it down. We did a few (like 5 to 8 times) vacuum analyze (no full), the pg_statistics relfilenode grew. There was no database operation when we did this, no other client connections except the one that does the vacuum. If we do plain simple "vacuum " (again no ful

Re: [PERFORM] index file bloating still in 7.4 ?

2003-10-21 Thread Tom Lane
Seum-Lim Gan <[EMAIL PROTECTED]> writes: > We did a few (like 5 to 8 times) vacuum analyze (no full), the > pg_statistics relfilenode grew. Well, sure. ANALYZE puts new rows into pg_statistic, and obsoletes old ones. You need to vacuum pg_statistic every so often (not to mention the other syste

Re: [PERFORM] Performance weirdness with/without vacuum analyze

2003-10-21 Thread Tom Lane
Harry Broomhall <[EMAIL PROTECTED]> writes: >-> Index Scan using import_cdrs_cdr_id_key on import_cdrs (cost=0.00..52.00 > rows=1000 width=164) (actual time=0.42..11479.51 rows=335671 loops=1) >-> Seq Scan on import_cdrs (cost=0.00..8496.71 rows=335671 width=126) (actual > time=0.15

Re: [PERFORM] Tuning for mid-size server

2003-10-21 Thread scott.marlowe
On Tue, 21 Oct 2003, Josh Berkus wrote: > Anjan, > > > Pretty soon, a PowerEdge 6650 with 4 x 2Ghz XEONs, and 8GB Memory, with > > internal drives on RAID5 will be delivered. Postgres will be from RH8.0. > > How many drives? RAID5 sucks for heavy read-write databases, unless you have > 5+ dri

Re: [PERFORM] Tuning for mid-size server

2003-10-21 Thread Anjan Dave
From what I know, there is a cache-row-set functionality that doesn't exist with the newer postgres... Concurrent users will start from 1 to a high of 5000 or more, and could ramp up rapidly. So far, with increased users, we have gone up to starting the JVM (resin startup) with 1024megs min and ma

Re: [PERFORM] Tuning for mid-size server

2003-10-21 Thread Anjan Dave
Josh, The 6650 can have upto 32GB of RAM. There are 5 drives. In future, they will be replaced by a fiber array - hopefully. I read an article that suggests you 'start' with 25% of memory for shared_buffers. Sort memory was suggested to be at 2-4%. Here's the link: http://www.ca.postgresql.org/d

Re: [PERFORM] Tuning for mid-size server

2003-10-21 Thread Josh Berkus
Scott, > Also, if it's a read only environment, RAID5 with n drives equals the > performance of RAID0 with n-1 drives. True. > Josh, you gotta get out more. IA32 has supported >4 gig ram for a long > time now, and so has the linux kernel. It uses a paging method to do it. > Individual processe

Re: [PERFORM] Low Insert/Update Performance

2003-10-21 Thread Josh Berkus
Rhaoni, > The delphi program does just one commit for all queries . > I was wandering if ther is some configuration parameters to be changed to > improve the performance ? To help you, we'll need to to trap a query and run an EXPLAIN ANALYZE on it. -- Josh Berkus Aglio Database Solutions San Fr

Re: [PERFORM] Tuning for mid-size server

2003-10-21 Thread Josh Berkus
Anjan, > I read an article that suggests you 'start' with 25% of memory for > shared_buffers. Sort memory was suggested to be at 2-4%. Here's the > link: > http://www.ca.postgresql.org/docs/momjian/hw_performance/node8.html > Maybe, I misinterpreted it. No, I can see how you arrived at that concl

Re: [PERFORM] Tuning for mid-size server

2003-10-21 Thread Josh Berkus
Anjan, > From what I know, there is a cache-row-set functionality that doesn't > exist with the newer postgres... What? PostgreSQL has always used the kernel cache for queries. > Concurrent users will start from 1 to a high of 5000 or more, and could > ramp up rapidly. So far, with increased us

Re: [PERFORM] Tuning for mid-size server

2003-10-21 Thread scott.marlowe
On Tue, 21 Oct 2003, Josh Berkus wrote: > Scott, > > > Also, if it's a read only environment, RAID5 with n drives equals the > > performance of RAID0 with n-1 drives. > > True. > > > Josh, you gotta get out more. IA32 has supported >4 gig ram for a long > > time now, and so has the linux kerne

Re: [PERFORM] Tuning for mid-size server

2003-10-21 Thread scott.marlowe
On Tue, 21 Oct 2003, Josh Berkus wrote: > Anjan, > > > From what I know, there is a cache-row-set functionality that doesn't > > exist with the newer postgres... > > What? PostgreSQL has always used the kernel cache for queries. > > > Concurrent users will start from 1 to a high of 5000 or mor

Re: [PERFORM] Tuning for mid-size server

2003-10-21 Thread Andrew Sullivan
On Tue, Oct 21, 2003 at 10:12:15AM -0700, Josh Berkus wrote: > > So what is the ceiling on 32-bit processors for RAM? Most of the 64-bit > vendors are pushing Athalon64 and G5 as "breaking the 4GB barrier", and even > I can do the math on 2^32. All these 64-bit vendors, then, are talking > ab

Re: [PERFORM] Tuning for mid-size server

2003-10-21 Thread Andrew Sullivan
On Tue, Oct 21, 2003 at 10:15:57AM -0700, Josh Berkus wrote: > Anjan, > > > I read an article that suggests you 'start' with 25% of memory for > > shared_buffers. Sort memory was suggested to be at 2-4%. Here's the > > link: > > http://www.ca.postgresql.org/docs/momjian/hw_performance/node8.html >

Re: [PERFORM] Tuning for mid-size server

2003-10-21 Thread Jeff
On Tue, 21 Oct 2003 10:12:15 -0700 Josh Berkus <[EMAIL PROTECTED]> wrote: > So what is the ceiling on 32-bit processors for RAM? Most of the > 64-bit vendors are pushing Athalon64 and G5 as "breaking the 4GB > barrier", and even I can do the math on 2^32. All these 64-bit > vendors, then, are ta

Re: [PERFORM] Tuning for mid-size server

2003-10-21 Thread Tom Lane
Andrew Sullivan <[EMAIL PROTECTED]> writes: > I think the "25%" rule of thumb is slightly stale: above some > threshold, it just falls apart, and lots of people now have machines > well within that threshold. Heck, I'll bet Bruce's 2-way machine is > within that threshold. IIRC, we've not seen mu

Re: [PERFORM] Tuning for mid-size server

2003-10-21 Thread Josh Berkus
Andrew, > I think the "25%" rule of thumb is slightly stale: above some > threshold, it just falls apart, and lots of people now have machines > well within that threshold. Heck, I'll bet Bruce's 2-way machine is > within that threshold. Sure. But we had a few people on this list do tests (incl

Re: [PERFORM] PostgreSQL data on a NAS device ?

2003-10-21 Thread Will LaShell
On Tue, 2003-10-21 at 08:40, scott.marlowe wrote: > So that brings up my question, which is better, the Perc4 or Perc3 > controllers, and what's the difference between them? I find Dell's > tendency to hide other people's hardware behind their own model numbers > mildly bothersome, as it makes

Re: [PERFORM] Tuning for mid-size server

2003-10-21 Thread Tom Lane
Andrew Sullivan <[EMAIL PROTECTED]> writes: > On Tue, Oct 21, 2003 at 10:12:15AM -0700, Josh Berkus wrote: >> So what is the ceiling on 32-bit processors for RAM? > ... Remember that, back in the old days on the > pre-386s, accessing the extended or expanded memory (anyone remember > which was whi

Re: [PERFORM] Tuning for mid-size server

2003-10-21 Thread Christopher Browne
In the last exciting episode, [EMAIL PROTECTED] (Josh Berkus) wrote: > So what is the ceiling on 32-bit processors for RAM? Most of the > 64-bit vendors are pushing Athalon64 and G5 as "breaking the 4GB > barrier", and even I can do the math on 2^32. All these 64-bit > vendors, then, are talking a

Re: [PERFORM] Tuning for mid-size server

2003-10-21 Thread Anjan Dave
Josh, The app servers are seperate dual-cpu boxes with 2GB RAM on each. Yes, from all the responses i have seen, i will be reducing the numbers to what has been suggested. Thanks to all, anjan -Original Message- From: Josh Berkus [mailto:[EMAIL PROTECTED] S

Re: [PERFORM] Tuning for mid-size server

2003-10-21 Thread Anjan Dave
Hopefully, i am not steering this into a different direction, but is there a way to find out how much sort memory each query is taking up, so that we can scale that up with increasing users? THanks, Anjan -Original Message- From: scott.marlowe [mailto:[EMAIL PROTECTED]

[PERFORM] RAID controllers etc... was: PostgreSQL data on a NAS device ?

2003-10-21 Thread scott.marlowe
On 21 Oct 2003, Will LaShell wrote: > On Tue, 2003-10-21 at 08:40, scott.marlowe wrote: > > > So that brings up my question, which is better, the Perc4 or Perc3 > > controllers, and what's the difference between them? I find Dell's > > tendency to hide other people's hardware behind their own

Re: [PERFORM] Tuning for mid-size server

2003-10-21 Thread Andrew Sullivan
On Tue, Oct 21, 2003 at 11:51:02AM -0700, Josh Berkus wrote: > Of course, if you have anecdotal evidence to the contrary, then the > only way to work this would be to have OSDL help us sort it out. Nope. I too have such anecdotal evidence that 25% is way too high. It also seems to depend pretty

Re: [PERFORM] Tuning for mid-size server

2003-10-21 Thread scott.marlowe
On Tue, 21 Oct 2003, Andrew Sullivan wrote: > On Tue, Oct 21, 2003 at 11:51:02AM -0700, Josh Berkus wrote: > > > Of course, if you have anecdotal evidence to the contrary, then the > > only way to work this would be to have OSDL help us sort it out. > > Nope. I too have such anecdotal evidence

Re: [PERFORM] RAID controllers etc... was: PostgreSQL data on a NAS device ?

2003-10-21 Thread Will LaShell
On Tue, 2003-10-21 at 13:36, scott.marlowe wrote: > On 21 Oct 2003, Will LaShell wrote: > > > On Tue, 2003-10-21 at 08:40, scott.marlowe wrote: > > > > > So that brings up my question, which is better, the Perc4 or Perc3 > > > controllers, and what's the difference between them? I find Dell's

Re: [PERFORM] Tuning for mid-size server

2003-10-21 Thread Andrew Sullivan
On Tue, Oct 21, 2003 at 03:11:17PM -0600, scott.marlowe wrote: > I think where it makes sense is when you have something like a report > server where the result sets may be huge, but the parellel load is load, > i.e. 5 or 10 users tossing around 100 Meg or more at time. In our case, we were noti

Re: [PERFORM] Tuning for mid-size server

2003-10-21 Thread Josh Berkus
Scott, > I think where it makes sense is when you have something like a report > server where the result sets may be huge, but the parellel load is load, > i.e. 5 or 10 users tossing around 100 Meg or more at time. I've found that that question makes the difference between using 6% & 12% ... p

[PERFORM] analyzing postgresql performance for dbt-2

2003-10-21 Thread markw
I'm running our DBT-2 workload against PostgreSQL 7.3.4 and I'm having some trouble figuring out what I should be looking for when I'm trying to tune the database. I have results for a decent baseline, but when I try to increase the load on the database, the performance drops. Nothing in the graph

Re: [PERFORM] analyzing postgresql performance for dbt-2

2003-10-21 Thread Bruce Momjian
[EMAIL PROTECTED] wrote: > I'm running our DBT-2 workload against PostgreSQL 7.3.4 and I'm having > some trouble figuring out what I should be looking for when I'm trying > to tune the database. I have results for a decent baseline, but when I > try to increase the load on the database, the perfor

Re: [PERFORM] analyzing postgresql performance for dbt-2

2003-10-21 Thread Mark Wong
On Tue, Oct 21, 2003 at 08:35:56PM -0400, Bruce Momjian wrote: > [EMAIL PROTECTED] wrote: > > I'm running our DBT-2 workload against PostgreSQL 7.3.4 and I'm having > > some trouble figuring out what I should be looking for when I'm trying > > to tune the database. I have results for a decent base