Re: Postgres performance comments from a MySQL user

From: "Matthew Nuzum" <cobalt(at)bearfruit(dot)org>
To: "'Dann Corbit'" <DCorbit(at)connx(dot)com>, "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "'Kaarel'" <kaarel(at)future(dot)ee>
Cc: "'Justin Clift'" <justin(at)postgresql(dot)org>, "'Jay O'Connor'" <joconnor(at)cybermesa(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Postgres performance comments from a MySQL user
Date: 2003-06-11 21:37:09
Message-ID: 003801c33061$9d340960$a322fea9@mattspc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

The problem with this is that in troubleshooting there's no frame of
reference. Having a stock config file, or stock config file options allows
a person to write to the list and say, "hey, I'm using medium.conf and I
have x ram..."

The alternative is, "hey, see my attached .conf file..." which takes a lot
more effort.

--
Matthew Nuzum
www.bearfruit.org
cobalt(at)bearfruit(dot)org

> -----Original Message-----
> From: Dann Corbit [mailto:DCorbit(at)connx(dot)com]
> Sent: Wednesday, June 11, 2003 4:05 PM
> To: Dann Corbit; Tom Lane; Kaarel
> Cc: Justin Clift; Jay O'Connor; pgsql-general(at)postgresql(dot)org
> Subject: Re: Postgres performance comments from a MySQL user
>
> > -----Original Message-----
> > From: Dann Corbit
> > Sent: Wednesday, June 11, 2003 12:35 PM
> > To: Tom Lane; Kaarel
> > Cc: Justin Clift; Jay O'Connor; pgsql-general(at)postgresql(dot)org
> > Subject: Re: [GENERAL] Postgres performance comments from a
> > MySQL user
> >
> >
> > > -----Original Message-----
> > > From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
> > > Sent: Wednesday, June 11, 2003 12:28 PM
> > > To: Kaarel
> > > Cc: Justin Clift; Jay O'Connor; pgsql-general(at)postgresql(dot)org
> > > Subject: Re: [GENERAL] Postgres performance comments from a
> > > MySQL user
> > >
> > >
> > > Kaarel <kaarel(at)future(dot)ee> writes:
> > > > This makes me wonder why is the default configuration so
> > > conservative?
> > >
> > > There are still a lot of platforms where desirable settings
> > > will cause the database to fail to start, because the default
> > > kernel limits on shared memory are still set for
> > > 1980s-vintage hardware.
> > >
> > > We have had a policy for a long time that we'd rather the
> > > out-of-the-box settings be guaranteed to start than that they
> > > be optimal for performance. No one is going to get as far as
> > > testing performance if the system won't start for them.
> > >
> > > Having said that, though, I do wonder whether we couldn't
> > > bump them up a little. Are there still any live platforms
> > > where the default SHMMAX is less than 4 MB? (There was
> > > discussion of this a month or two back on pghackers, but no
> > > conclusion.)
> >
> > I think this would be very, very nice:
> > Config_tool.exe runs, and examines:
> > Operating system, available memory, disk, cpu speed, etc.
> > (whatever it can figure out). Then it makes good guesses for
> > what PostgreSQL parameters to use and reconfigures PostgreSQL.
> >
> > If it was part of the installation, then even better.
>
> /*
> Sample for Win32 machines. It should be a snap for some UNIX guru to
> write one for UNIX type systems.
> */
>
>
> #include <windows.h>
> #include <stdio.h>
> // Use to change the divisor from Kb to Mb.
>
> #define DIV 1024
> // #define DIV 1
>
> char *divisor = "K";
> // char *divisor = "";
>
> // Handle the width of the field in which to print numbers this way to
> // make changes easier. The asterisk in the print format specifier
> // "%*ld" takes an int from the argument list, and uses it to pad and
> // right-justify the number being formatted.
> #define WIDTH 7
>
> int main(int argc, char *argv[])
> {
> MEMORYSTATUS stat;
>
> GlobalMemoryStatus(&stat);
>
> printf("%ld percent of memory is in use.\n",
> stat.dwMemoryLoad);
> printf("There are %*ld total %sbytes of physical memory.\n",
> WIDTH, stat.dwTotalPhys / DIV, divisor);
> printf("There are %*ld free %sbytes of physical memory.\n",
> WIDTH, stat.dwAvailPhys / DIV, divisor);
> printf("There are %*ld total %sbytes of paging file.\n",
> WIDTH, stat.dwTotalPageFile / DIV, divisor);
> printf("There are %*ld free %sbytes of paging file.\n",
> WIDTH, stat.dwAvailPageFile / DIV, divisor);
> printf("There are %*lx total %sbytes of virtual memory.\n",
> WIDTH, stat.dwTotalVirtual / DIV, divisor);
> printf("There are %*lx free %sbytes of virtual memory.\n",
> WIDTH, stat.dwAvailVirtual / DIV, divisor);
> return 0;
> }
> /*
> C:\tmp>ramsize
> 74 percent of memory is in use.
> There are 523744 total Kbytes of physical memory.
> There are 131796 free Kbytes of physical memory.
> There are 1539616 total Kbytes of paging file.
> There are 646924 free Kbytes of paging file.
> There are 1fff80 total Kbytes of virtual memory.
> There are 1feb54 free Kbytes of virtual memory.
> */

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rory Campbell-Lange 2003-06-11 22:29:55 Trouble returning setof
Previous Message Matthew Nuzum 2003-06-11 21:33:29 Re: Postgres performance comments from a MySQL user

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Treat 2003-06-11 22:02:06 Re: PostgreSQL under Windows
Previous Message Marc G. Fournier 2003-06-11 20:56:48 Re: Question about simple function folding optimization