From: | "Dann Corbit" <DCorbit(at)connx(dot)com> |
---|---|
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 20:05:26 |
Message-ID: | D90A5A6C612A39408103E6ECDD77B8294CDD51@voyager.corporate.connx.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
> -----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.
*/
From | Date | Subject | |
---|---|---|---|
Next Message | Edmund Dengler | 2003-06-11 20:06:04 | Re: Performance of query (fwd) |
Previous Message | Oleg Bartunov | 2003-06-11 20:05:16 | Re: tsearch v2 |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-06-11 20:24:22 | Re: Pre-allocation of shared memory ... |
Previous Message | Rod Taylor | 2003-06-11 20:01:15 | Re: [GENERAL] How to enumerate foreign key constraints after |