go for a script! / ex: PostgreSQL vs. MySQL

Поиск
Список
Период
Сортировка
От Oliver Scheit
Тема go for a script! / ex: PostgreSQL vs. MySQL
Дата
Msg-id B7397E6AC70AB1418180FA3480B9365556A69A@deun2kex01.realgarant.de
обсуждение исходный текст
Ответы Re: go for a script! / ex: PostgreSQL vs. MySQL  (Paul Thomas <paul@tmsl.demon.co.uk>)
Re: go for a script! / ex: PostgreSQL vs. MySQL  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-performance
Hi guys,

I followed the discussion and here are my 0.2$:

I think instead of thinking about where to put the
information about tuning, someone should provide a
"pgsql-autotune". Maybe even a shell script would do the
trick.

It's not so hard to find out, how much memory is installed,
and IMHO SHARED_BUFFERS, SORT_MEM and EFFECTIVE_CACHE_SIZE
depend heavily on this. a "cat /proc/sys/kernel/shmmax"
would give some valuable information on linux boxes,
there is probably other stuff for different OSes.

random_page_cost could be set after probing the harddisks,
maybe even do a hdparm -tT if they seem to be ATA, not SCSI.

Now, let's pretend the script finds out there is 1 GB RAM,
it could ask something like "Do you want to optimize the
settings for postgres (other applications may suffer from
having not enough RAM) or do you want to use moderate
settings?"

Something like this, you get the idea.

This would give new users a much more usable start than
the current default settings and would still leave all
the options to do fine-tuning later.

I guess my point is simply this:
instead of saying: "okay we use default settings that will
run on _old_ hardware too" we should go for a little script
that creates a "still save but much better" config file.
There's just no point in setting SHARED_BUFFERS to something
like 16 (what's the current default?) if the PC has >= 1 GB
of RAM. Setting it to 8192 would still be save, but 512 times
better...  ;-) (IIRC 8192 would take 64 MB of RAM, which
should be save if you leave the default MAX_CONNECTIONS.)

As said before: just my $0.2

My opinion on this case is Open Source. Feel free to modify
and add.  :-)

regards,
Oli

В списке pgsql-performance по дате отправления:

Предыдущее
От: Andriy Tkachuk
Дата:
Сообщение: Re: IMMUTABLE function's flag do not work: 7.3.4, plpgsql
Следующее
От: Andrew Sullivan
Дата:
Сообщение: Re: PostgreSQL vs. MySQL