Lists: | pgsql-generalpgsql-performance |
---|
From: | "Nick Barr" <nicky(at)chuckie(dot)co(dot)uk> |
---|---|
To: | <pgsql-performance(at)postgresql(dot)org> |
Subject: | go for a script! / ex: PostgreSQL vs. MySQL |
Date: | 2003-10-10 12:35:53 |
Message-ID: | 007901c38f2b007901c38f2b$0b585590$2802a8c0@webbased10b58559002a8c0@webbased10 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-performance |
Heya Guys n Gals,
Having been following the thread on "go for a script! / ex: PostgreSQL vs.
MySQL". I thought I would throw something together in Perl. My current issue
is that I only have access to a RH Linux box and so cannot make it
cross-platform on my own :-(. Anyhow please find it attached. It runs fine
on my box, it doesnt actually write to postgresql.conf because I didnt want
to mess it up, it does however write to postgresql.conf.new for the moment.
The diffs seem to be writing correctly. There are a set of parameters at the
top which may need to get tweaked for your platform. I can also carry on
posting to this list new versions if people want. Clearly this lot is open
source, so please feel free to play with it and post patches/new features
back either to the list or my email directly. In case you cant see my email
address, it is nicky at the domain below.
I will also post it on me website and as I develop it further new versions
will appear there
http://www.chuckie.co.uk/postgresql/pg_autoconfig.pl
Is this a useful start?
Nick
Attachment | Content-Type | Size |
---|---|---|
pg_autoconfig.pl | application/octet-stream | 6.6 KB |
From: | Josh Berkus <josh(at)agliodbs(dot)com> |
---|---|
To: | "Nick Barr" <nicky(at)chuckie(dot)co(dot)uk>, <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: go for a script! / ex: PostgreSQL vs. MySQL |
Date: | 2003-10-10 17:34:52 |
Message-ID: | 200310101034.52073.josh@agliodbs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-performance |
Nick,
> Having been following the thread on "go for a script! / ex: PostgreSQL vs.
> MySQL". I thought I would throw something together in Perl.
Cool! Would you be willing to work with me so that I can inject some of my
knowledge of .conf tuning?
--
Josh Berkus
Aglio Database Solutions
San Francisco
From: | Nick Barr <nicky(at)chuckie(dot)co(dot)uk> |
---|---|
To: | Josh Berkus <josh(at)agliodbs(dot)com> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: go for a script! / ex: PostgreSQL vs. MySQL |
Date: | 2003-10-10 18:08:59 |
Message-ID: | 3F86F5BB.90605@chuckie.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-performance |
Josh Berkus wrote:
>Nick,
>
>
>
>>Having been following the thread on "go for a script! / ex: PostgreSQL vs.
>>MySQL". I thought I would throw something together in Perl.
>>
>>
>
>Cool! Would you be willing to work with me so that I can inject some of my
>knowledge of .conf tuning?
>
>
>
Sounds good to me. I will carry on working on it but I would definitely
need some help, or at least a list of parameters to tweak, and some
recomended values based on data about the puter in question.
So far:
shared_buffers = 1/16th of total memory
effective_cache_size = 80% of the supposed kernel cache.
I guess we also may be able to offer a simple and advanced mode. Simple
mode would work on these recomended values, but kick it into advanced
mode and the user can tweak things more finely. This would only be
recomended for the Guru's out there of course. This may take a bit more
time to do though.
As I said in the previous email I have only got access to Linux, so
cross-platform help would be good too. I will try to make it as easy to
do cross platform stuff as possible of course.
Nick
From: | Vivek Khera <khera(at)kcilink(dot)com> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: go for a script! / ex: PostgreSQL vs. MySQL |
Date: | 2003-10-10 20:26:58 |
Message-ID: | x7wubcon3h.fsf@yertle.int.kciLink.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-performance |
>>>>> "NB" == Nick Barr <nicky(at)chuckie(dot)co(dot)uk> writes:
NB> So far:
NB> shared_buffers = 1/16th of total memory
NB> effective_cache_size = 80% of the supposed kernel cache.
Please take into account the blocksize compiled into PG, too...
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D. Khera Communications, Inc.
Internet: khera(at)kciLink(dot)com Rockville, MD +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera http://www.khera.org/~vivek/
From: | Josh Berkus <josh(at)agliodbs(dot)com> |
---|---|
To: | Nick Barr <nicky(at)chuckie(dot)co(dot)uk> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: go for a script! / ex: PostgreSQL vs. MySQL |
Date: | 2003-10-10 20:38:18 |
Message-ID: | 200310101338.18167.josh@agliodbs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-performance |
Nick,
> Sounds good to me. I will carry on working on it but I would definitely
> need some help, or at least a list of parameters to tweak, and some
> recomended values based on data about the puter in question.
> shared_buffers = 1/16th of total memory
> effective_cache_size = 80% of the supposed kernel cache.
But only if it's a dedicated DB machine. If it's not, all memory values
should be cut in half.
> I guess we also may be able to offer a simple and advanced mode. Simple
> mode would work on these recomended values, but kick it into advanced
> mode and the user can tweak things more finely. This would only be
> recomended for the Guru's out there of course. This may take a bit more
> time to do though.
What I would prefer would be an interactive script which would, by asking the
user simple questions and system scanning, collect all the information
necessary to set:
max_connections
shared_buffers
sort_mem
vacuum_mem
effective_cache_size
random_page_cost
max_fsm_pages
checkpoint_segments & checkpoint_timeout
tcp_ip
and on the OS, it should set:
shmmax & shmmall
and should offer to create a chron job which does appropriate frequency VACUUM
ANALYZE.
> As I said in the previous email I have only got access to Linux, so
> cross-platform help would be good too. I will try to make it as easy to
> do cross platform stuff as possible of course.
Let's get it working on Linux; then we can rely on the community to port it to
other platforms. I myself can work on the ports to Solaris and OS X.
--
Josh Berkus
Aglio Database Solutions
San Francisco
From: | Josh Berkus <josh(at)agliodbs(dot)com> |
---|---|
To: | Vivek Khera <khera(at)kcilink(dot)com>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: go for a script! / ex: PostgreSQL vs. MySQL |
Date: | 2003-10-10 20:39:48 |
Message-ID: | 200310101339.48392.josh@agliodbs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-performance |
Vivek,
> NB> shared_buffers = 1/16th of total memory
> NB> effective_cache_size = 80% of the supposed kernel cache.
>
> Please take into account the blocksize compiled into PG, too...
We can;t change the blocksize in a script that only does the .conf file. Or
are you suggesting something else?
--
Josh Berkus
Aglio Database Solutions
San Francisco
From: | Vivek Khera <khera(at)kcilink(dot)com> |
---|---|
To: | Josh Berkus <josh(at)agliodbs(dot)com> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: go for a script! / ex: PostgreSQL vs. MySQL |
Date: | 2003-10-10 21:14:25 |
Message-ID: | 16263.8497.95525.673249@yertle.int.kciLink.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-performance |
>>>>> "JB" == Josh Berkus <josh(at)agliodbs(dot)com> writes:
JB> Vivek,
NB> shared_buffers = 1/16th of total memory
NB> effective_cache_size = 80% of the supposed kernel cache.
>>
>> Please take into account the blocksize compiled into PG, too...
JB> We can;t change the blocksize in a script that only does the .conf
JB> file. Or are you suggesting something else?
when you compute optimal shared buffers and effective cache size,
these are in terms of blocksize. so if I have 16k block size, you
can't compute based on default 8k blocksize. at worst, it would have
to be a parameter you pass to the tuning script.
From: | Josh Berkus <josh(at)agliodbs(dot)com> |
---|---|
To: | Vivek Khera <khera(at)kcilink(dot)com> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: go for a script! / ex: PostgreSQL vs. MySQL |
Date: | 2003-10-10 21:49:00 |
Message-ID: | 200310101449.00893.josh@agliodbs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-performance |
Vivek,
> when you compute optimal shared buffers and effective cache size,
> these are in terms of blocksize. so if I have 16k block size, you
> can't compute based on default 8k blocksize. at worst, it would have
> to be a parameter you pass to the tuning script.
Oh, yes! Thank you.
--
-Josh Berkus
Aglio Database Solutions
San Francisco
From: | Sean Chittenden <sean(at)chittenden(dot)org> |
---|---|
To: | Vivek Khera <khera(at)kcilink(dot)com> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: go for a script! / ex: PostgreSQL vs. MySQL |
Date: | 2003-10-10 22:59:24 |
Message-ID: | 20031010225924.GC8664@perrin.nxad.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-performance |
> NB> So far:
>
> NB> shared_buffers = 1/16th of total memory
> NB> effective_cache_size = 80% of the supposed kernel cache.
>
> Please take into account the blocksize compiled into PG, too...
Would anyone object to a patch that exports the blocksize via a
readonly GUC? Too many tunables are page dependant, which is
infuriating when copying configs from DB to DB. I wish pgsql had some
notion of percentages for values that end with a '%'. -sc
--
Sean Chittenden
From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Sean Chittenden <sean(at)chittenden(dot)org> |
Cc: | Vivek Khera <khera(at)kcilink(dot)com>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: go for a script! / ex: PostgreSQL vs. MySQL |
Date: | 2003-10-11 01:49:05 |
Message-ID: | 200310110149.h9B1n5905115@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-performance |
Sean Chittenden wrote:
> > NB> So far:
> >
> > NB> shared_buffers = 1/16th of total memory
> > NB> effective_cache_size = 80% of the supposed kernel cache.
> >
> > Please take into account the blocksize compiled into PG, too...
>
> Would anyone object to a patch that exports the blocksize via a
> readonly GUC? Too many tunables are page dependant, which is
> infuriating when copying configs from DB to DB. I wish pgsql had some
> notion of percentages for values that end with a '%'. -sc
Makes sense to me --- we already have some read-only GUC variables.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From: | Rod Taylor <rbt(at)rbt(dot)ca> |
---|---|
To: | Sean Chittenden <sean(at)chittenden(dot)org> |
Cc: | Vivek Khera <khera(at)kcilink(dot)com>, Postgresql Performance <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: go for a script! / ex: PostgreSQL vs. MySQL |
Date: | 2003-10-11 01:55:34 |
Message-ID: | 1065837333.12875.1.camel@jester |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-performance |
On Fri, 2003-10-10 at 18:59, Sean Chittenden wrote:
> > NB> So far:
> >
> > NB> shared_buffers = 1/16th of total memory
> > NB> effective_cache_size = 80% of the supposed kernel cache.
> >
> > Please take into account the blocksize compiled into PG, too...
>
> Would anyone object to a patch that exports the blocksize via a
> readonly GUC? Too many tunables are page dependant, which is
> infuriating when copying configs from DB to DB. I wish pgsql had some
> notion of percentages for values that end with a '%'.
Rather than showing the block size, how about we change the tunables to
be physical sizes rather than block based?
effective_cache_size = 1.5GB
shared_buffers = 25MB
Percentages would be slick as well, but doing the above should fix most
of the issue -- and be friendlier to read.
From: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
---|---|
To: | Vivek Khera <khera(at)kcilink(dot)com> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: go for a script! / ex: PostgreSQL vs. MySQL |
Date: | 2003-10-11 05:20:43 |
Message-ID: | 3F87932B.4050507@familyhealth.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-performance |
> NB> shared_buffers = 1/16th of total memory
> NB> effective_cache_size = 80% of the supposed kernel cache.
I think Sean(?) mentioned this one for FreeBSD (Bash code):
echo "effective_cache_size = $((`sysctl -n vfs.hibufspace` / 8192))"
I've used it for my dedicated servers. Is this calculation correct?
Chris
From: | Sean Chittenden <sean(at)chittenden(dot)org> |
---|---|
To: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
Cc: | Vivek Khera <khera(at)kcilink(dot)com>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: go for a script! / ex: PostgreSQL vs. MySQL |
Date: | 2003-10-11 09:23:08 |
Message-ID: | 20031011092308.GA39942@perrin.nxad.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-performance |
> >NB> shared_buffers = 1/16th of total memory
> >NB> effective_cache_size = 80% of the supposed kernel cache.
>
> I think Sean(?) mentioned this one for FreeBSD (Bash code):
sh, not bash. :)
> echo "effective_cache_size = $((`sysctl -n vfs.hibufspace` / 8192))"
>
> I've used it for my dedicated servers. Is this calculation correct?
Yes, or it's real close at least. vfs.hibufspace is the amount of
kernel space that's used for caching IO operations (minus the
necessary space taken for the kernel). If you're real paranoid, you
could do some kernel profiling and figure out how much of the cache is
actually disk IO and multiply the above by some percentage, say 80%?
I haven't found it necessary to do so yet. Since hibufspace is all IO
and caching any net activity is kinda pointless and I assume that 100%
of it is used for a disk cache and don't use a multiplier. The 8192,
however, is the size of a PG page, so, if you tweak PG's page size,
you have to change this constant (*grumbles*).
-sc
--
Sean Chittenden
From: | Harald Fuchs <nospam(at)sap(dot)com> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: go for a script! / ex: PostgreSQL vs. MySQL |
Date: | 2003-10-11 10:22:42 |
Message-ID: | pupth43wgd.fsf@srv.protecting.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-performance |
In article <1065837333(dot)12875(dot)1(dot)camel(at)jester>,
Rod Taylor <rbt(at)rbt(dot)ca> writes:
>> Would anyone object to a patch that exports the blocksize via a
>> readonly GUC? Too many tunables are page dependant, which is
>> infuriating when copying configs from DB to DB. I wish pgsql had some
>> notion of percentages for values that end with a '%'.
> Rather than showing the block size, how about we change the tunables to
> be physical sizes rather than block based?
> effective_cache_size = 1.5GB
> shared_buffers = 25MB
Amen! Being forced to set config values in some obscure units rather
than bytes is an ugly braindamage which should be easy to fix.
From: | Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net> |
---|---|
To: | PgSQL Performance ML <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: go for a script! / ex: PostgreSQL vs. MySQL |
Date: | 2003-10-11 10:43:27 |
Message-ID: | 1065869007.24193.45.camel@haggis |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-performance |
On Sat, 2003-10-11 at 05:22, Harald Fuchs wrote:
> In article <1065837333(dot)12875(dot)1(dot)camel(at)jester>,
> Rod Taylor <rbt(at)rbt(dot)ca> writes:
>
> >> Would anyone object to a patch that exports the blocksize via a
> >> readonly GUC? Too many tunables are page dependant, which is
> >> infuriating when copying configs from DB to DB. I wish pgsql had some
> >> notion of percentages for values that end with a '%'.
>
> > Rather than showing the block size, how about we change the tunables to
> > be physical sizes rather than block based?
>
> > effective_cache_size = 1.5GB
> > shared_buffers = 25MB
>
> Amen! Being forced to set config values in some obscure units rather
> than bytes is an ugly braindamage which should be easy to fix.
But it's too user-friendly to do it this way!
--
-----------------------------------------------------------------
Ron Johnson, Jr. ron(dot)l(dot)johnson(at)cox(dot)net
Jefferson, LA USA
When Swedes start committing terrorism, I'll become suspicious of
Scandanavians.
From: | Nick Barr <nicky(at)chuckie(dot)co(dot)uk> |
---|---|
To: | Josh Berkus <josh(at)agliodbs(dot)com> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: go for a script! / ex: PostgreSQL vs. MySQL |
Date: | 2003-10-11 14:55:43 |
Message-ID: | 3F8819EF.7010004@chuckie.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-performance |
Josh Berkus wrote:
>>shared_buffers = 1/16th of total memory
>>effective_cache_size = 80% of the supposed kernel cache.
>>
>>
>But only if it's a dedicated DB machine. If it's not, all memory values
>should be cut in half.
>
>
>
>What I would prefer would be an interactive script which would, by asking the
>user simple questions and system scanning, collect all the information
>necessary to set:
>
>max_connections
>shared_buffers
>sort_mem
>vacuum_mem
>effective_cache_size
>random_page_cost
>max_fsm_pages
>checkpoint_segments & checkpoint_timeout
>tcp_ip
>
>and on the OS, it should set:
>shmmax & shmmall
>and should offer to create a chron job which does appropriate frequency VACUUM
>ANALYZE.
>
>
I reckon do a system scan first, and parse the current PostgreSQL conf
file to figure out what the settings are. Also back it up with a date
and time appended to the end to make sure there is a backup before
overwriting the real conf file. Then a bunch of questions. What sort of
questions would need to be asked and which parameters would these
questions affect? So far, and from my limited understanding of the .conf
file, I reckon there should be the following
Here is your config of your hardware as detected. Is this correct ?
This could potentially be several questions, i.e. one for proc, mem,
os, hdd etc
Would affect shared_buffers, sort_mem, effective_cache_size,
random_page_cost
How was PostgreSQL compiled?
This would be parameters such as the block size and a few other
compile time parameters. If we can get to some of these read-only
parameters than that would make this step easier, certainly for the new
recruits amongst us.
Is PostgreSQL the only thing being run on this computer?
Then my previous assumptions about shared_buffers and
effective_cache_size would be true.
If shmmax and shmmall are too small, then:
PostgreSQL requires some more shared memory to cache some tables, x Mb,
do you want to increase your OS kernel parameters?
Tweak shmmax and shmmall
How are the clients going to connect?
i.e. TCP or Unix sockets
How many clients can connect to this database at once?
Affects max_connections
How many databases and how many tables in each database are going to be
present?
Affects max_fsm_pages, checkpoint_segments, checkpoint_timeout
Do you want to vacuum you database regularly?
Initial question for cron job
It is recomended that you vacuum analyze every night, do you want to do
this?
It is also recomended that you vacuum full every month, do you want to
do this?
Thoughts?
Nick
From: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
---|---|
To: | Nick Barr <nicky(at)chuckie(dot)co(dot)uk> |
Cc: | Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: go for a script! / ex: PostgreSQL vs. MySQL |
Date: | 2003-10-12 02:43:35 |
Message-ID: | 3F88BFD7.1020808@familyhealth.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-performance |
> If shmmax and shmmall are too small, then:
>
> PostgreSQL requires some more shared memory to cache some tables, x Mb,
> do you want to increase your OS kernel parameters?
>
> Tweak shmmax and shmmall
Note that this still requires a kernel recompile on FreeBSD :(
Chris
From: | Josh Berkus <josh(at)agliodbs(dot)com> |
---|---|
To: | Nick Barr <nicky(at)chuckie(dot)co(dot)uk> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: go for a script! / ex: PostgreSQL vs. MySQL |
Date: | 2003-10-12 20:30:45 |
Message-ID: | 200310121330.45115.josh@agliodbs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-performance |
Nick,
> I reckon do a system scan first, and parse the current PostgreSQL conf
> file to figure out what the settings are. Also back it up with a date
> and time appended to the end to make sure there is a backup before
> overwriting the real conf file. Then a bunch of questions. What sort of
> questions would need to be asked and which parameters would these
> questions affect? So far, and from my limited understanding of the .conf
> file, I reckon there should be the following
Hmmm ... but I do think that there should be a file to store the user's
previous answers. That way, the script can easily be re-run to fix config
issues.
> Here is your config of your hardware as detected. Is this correct ?
>
> This could potentially be several questions, i.e. one for proc, mem,
> os, hdd etc
> Would affect shared_buffers, sort_mem, effective_cache_size,
> random_page_cost
Actually, I think this would break down into:
-- Are Proc & Mem correct? If not, type in correct values
-- Is OS correct? If not, select from list
-- Your HDD: is it:
1) IDE
2) Fast multi-disk SCSI or low-end RAID
3) Medium-to-high-end RAID
Other things, we don't care about.
> How was PostgreSQL compiled?
>
> This would be parameters such as the block size and a few other
> compile time parameters. If we can get to some of these read-only
> parameters than that would make this step easier, certainly for the new
> recruits amongst us.
Actually, from my perspective, we shouldn't bother with this; if an admin
knows enough to set an alternate blaock size for PG, then they know enough to
tweak the Conf file by hand. I think we should just issue a warning that
this script:
1) does not work for anyone who is using non-default block sizes,
2) may not work well for anyone using unusual locales, optimization flags, or
other non-default compile options except for language interfaces.
3) cannot produce good settings for embedded systems;
4) will not work well for systems which are extremely low on disk space,
memory, or other resouces.
Basically, the script only really needs to work for the people who are
installing PostgreSQL with the default options or from RPM on regular server
or workstation machines with plenty of disk space for normal database
purposes. People who have more complicated setups can read the darned
documentation and tune the conf file by hand.
> Is PostgreSQL the only thing being run on this computer?
First, becuase it affects a couple of other variables:
What kind of database server are you expecting to run?
A) Web Server (many small fast queries from many users, and not much update
activity)
B) Online Transaction Processing (OLTP) database (many small updates
constantly from many users; think "accounting application").
C) Online Analytical Reporting (OLAP) database (a few large and complicated
read-only queries aggregating large quantites of data for display)
D) Data Transformation tool (loading large amounts of data to process,
transform, and output to other software)
E) Mixed-Use Database Server (a little of all of the above)
F) Workstation (installing this database on a user machine which also has a
desktop, does word processing, etc.)
If the user answers anything but (F), then we ask:
Will you be running any other signficant software on this server, such as a
web server, a Java runtime engine, or a reporting application? (yes|no)
If yes, then:
How much memory do you expect this other software, in total, to regularly use
while PostgreSQL is in use? (# in MB; should offer default of 50% of the RAM
scanned).
> How are the clients going to connect?
>
> i.e. TCP or Unix sockets
We should warn them that they will still need to configure pg_hba.conf.
> How many clients can connect to this database at once?
>
> Affects max_connections
Should add a parenthetical comment that for applications which use pooled
connections, or intermittent connection, such as Web applications, the number
of concurrent connections is often much lower than the number of concurrent
users.
> How many databases and how many tables in each database are going to be
> present?
>
> Affects max_fsm_pages, checkpoint_segments, checkpoint_timeout
Also need to ask if they have an idea of the total size of all databases, in
MB or GB, which has a stronger relationship to those variables.
Also, this will give us a chance to check the free space on the PGDATA
partition, and kick the user out with a warning if there is not at least
2xExpected Size available.
> Do you want to vacuum you database regularly?
>
> Initial question for cron job
>
> It is recomended that you vacuum analyze every night, do you want to do
> this?
> It is also recomended that you vacuum full every month, do you want to
> do this?
Depends on size/type of database. For large OLTP databases, I recommend
vacuum as often as every 5 mintues, analyze every hour, and Vacuum Full +
Reindex once a week. For a workstation database, your frequencies are
probably OK.
--
Josh Berkus
Aglio Database Solutions
San Francisco
From: | Josh Berkus <josh(at)agliodbs(dot)com> |
---|---|
To: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Nick Barr <nicky(at)chuckie(dot)co(dot)uk> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: go for a script! / ex: PostgreSQL vs. MySQL |
Date: | 2003-10-12 20:31:42 |
Message-ID: | 200310121331.42693.josh@agliodbs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-performance |
Chris,
> > PostgreSQL requires some more shared memory to cache some tables, x Mb,
> > do you want to increase your OS kernel parameters?
> >
> > Tweak shmmax and shmmall
>
> Note that this still requires a kernel recompile on FreeBSD :(
Not our fault, now is it? This would mean that we wouldn't be able to script
for FreeBSD. Bug the FreeBSD developers.
--
Josh Berkus
Aglio Database Solutions
San Francisco
From: | Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net> |
---|---|
To: | PgSQL General ML <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: [PERFORM] go for a script! / ex: PostgreSQL vs. MySQL |
Date: | 2003-10-12 22:10:34 |
Message-ID: | 1065996634.16433.115.camel@haggis |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-performance |
On Sun, 2003-10-12 at 15:31, Josh Berkus wrote:
> Chris,
>
> > > PostgreSQL requires some more shared memory to cache some tables, x Mb,
> > > do you want to increase your OS kernel parameters?
> > >
> > > Tweak shmmax and shmmall
> >
> > Note that this still requires a kernel recompile on FreeBSD :(
>
> Not our fault, now is it? This would mean that we wouldn't be able to script
> for FreeBSD. Bug the FreeBSD developers.
<TROLL=HAND-GRENADE>
Or use a good OS, instead.
</TROLL>
--
-----------------------------------------------------------------
Ron Johnson, Jr. ron(dot)l(dot)johnson(at)cox(dot)net
Jefferson, LA USA
"Oh, great altar of passive entertainment, bestow upon me thy
discordant images at such speed as to render linear thought
impossible"
Calvin, regarding TV
From: | pginfo <pginfo(at)t1(dot)unisoftbg(dot)com> |
---|---|
To: | Josh Berkus <josh(at)agliodbs(dot)com> |
Cc: | Nick Barr <nicky(at)chuckie(dot)co(dot)uk>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: go for a script! / ex: PostgreSQL vs. MySQL |
Date: | 2003-10-13 05:01:26 |
Message-ID: | 3F8A31A6.94849F1A@t1.unisoftbg.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-performance |
Hi,
Josh Berkus wrote:
> Nick,
>
> > I reckon do a system scan first, and parse the current PostgreSQL conf
> > file to figure out what the settings are. Also back it up with a date
> > and time appended to the end to make sure there is a backup before
> > overwriting the real conf file. Then a bunch of questions. What sort of
> > questions would need to be asked and which parameters would these
> > questions affect? So far, and from my limited understanding of the .conf
> > file, I reckon there should be the following
>
> Hmmm ... but I do think that there should be a file to store the user's
> previous answers. That way, the script can easily be re-run to fix config
> issues.
>
> > Here is your config of your hardware as detected. Is this correct ?
> >
> > This could potentially be several questions, i.e. one for proc, mem,
> > os, hdd etc
> > Would affect shared_buffers, sort_mem, effective_cache_size,
> > random_page_cost
>
> Actually, I think this would break down into:
> -- Are Proc & Mem correct? If not, type in correct values
> -- Is OS correct? If not, select from list
> -- Your HDD: is it:
> 1) IDE
> 2) Fast multi-disk SCSI or low-end RAID
> 3) Medium-to-high-end RAID
>
> Other things, we don't care about.
>
> > How was PostgreSQL compiled?
> >
> > This would be parameters such as the block size and a few other
> > compile time parameters. If we can get to some of these read-only
> > parameters than that would make this step easier, certainly for the new
> > recruits amongst us.
>
> Actually, from my perspective, we shouldn't bother with this; if an admin
> knows enough to set an alternate blaock size for PG, then they know enough to
> tweak the Conf file by hand. I think we should just issue a warning that
> this script:
> 1) does not work for anyone who is using non-default block sizes,
> 2) may not work well for anyone using unusual locales, optimization flags, or
> other non-default compile options except for language interfaces.
> 3) cannot produce good settings for embedded systems;
> 4) will not work well for systems which are extremely low on disk space,
> memory, or other resouces.
> Basically, the script only really needs to work for the people who are
> installing PostgreSQL with the default options or from RPM on regular server
> or workstation machines with plenty of disk space for normal database
> purposes. People who have more complicated setups can read the darned
> documentation and tune the conf file by hand.
>
> > Is PostgreSQL the only thing being run on this computer?
>
> First, becuase it affects a couple of other variables:
>
> What kind of database server are you expecting to run?
> A) Web Server (many small fast queries from many users, and not much update
> activity)
> B) Online Transaction Processing (OLTP) database (many small updates
> constantly from many users; think "accounting application").
> C) Online Analytical Reporting (OLAP) database (a few large and complicated
> read-only queries aggregating large quantites of data for display)
> D) Data Transformation tool (loading large amounts of data to process,
> transform, and output to other software)
> E) Mixed-Use Database Server (a little of all of the above)
> F) Workstation (installing this database on a user machine which also has a
> desktop, does word processing, etc.)
>
> If the user answers anything but (F), then we ask:
>
> Will you be running any other signficant software on this server, such as a
> web server, a Java runtime engine, or a reporting application? (yes|no)
>
> If yes, then:
>
> How much memory do you expect this other software, in total, to regularly use
> while PostgreSQL is in use? (# in MB; should offer default of 50% of the RAM
> scanned).
>
> > How are the clients going to connect?
> >
> > i.e. TCP or Unix sockets
>
> We should warn them that they will still need to configure pg_hba.conf.
>
> > How many clients can connect to this database at once?
> >
> > Affects max_connections
>
> Should add a parenthetical comment that for applications which use pooled
> connections, or intermittent connection, such as Web applications, the number
> of concurrent connections is often much lower than the number of concurrent
> users.
>
> > How many databases and how many tables in each database are going to be
> > present?
> >
> > Affects max_fsm_pages, checkpoint_segments, checkpoint_timeout
>
> Also need to ask if they have an idea of the total size of all databases, in
> MB or GB, which has a stronger relationship to those variables.
>
Why not to make a cron script that will detect this size fot hil self?In many
cases we do not have a good idea how many records(size) will be in data base.
> Also, this will give us a chance to check the free space on the PGDATA
> partition, and kick the user out with a warning if there is not at least
> 2xExpected Size available.
>
> > Do you want to vacuum you database regularly?
> >
> > Initial question for cron job
> >
> > It is recomended that you vacuum analyze every night, do you want to do
> > this?
> > It is also recomended that you vacuum full every month, do you want to
> > do this?
>
> Depends on size/type of database. For large OLTP databases, I recommend
> vacuum as often as every 5 mintues, analyze every hour, and Vacuum Full +
> Reindex once a week. For a workstation database, your frequencies are
> probably OK.
>
> --
> Josh Berkus
> Aglio Database Solutions
> San Francisco
>
regards,ivan.
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
From: | Vivek Khera <khera(at)kcilink(dot)com> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: go for a script! / ex: PostgreSQL vs. MySQL |
Date: | 2003-10-13 14:04:35 |
Message-ID: | 16266.45299.517752.465494@yertle.int.kciLink.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-performance |
>>>>> "SC" == Sean Chittenden <sean(at)chittenden(dot)org> writes:
>> echo "effective_cache_size = $((`sysctl -n vfs.hibufspace` / 8192))"
>>
>> I've used it for my dedicated servers. Is this calculation correct?
SC> Yes, or it's real close at least. vfs.hibufspace is the amount of
SC> kernel space that's used for caching IO operations (minus the
I'm just curious if anyone has a tip to increase the amount of memory
FreeBSD will use for the cache? It appears to me that even on my 2Gb
box, lots of memory is 'free' that could be used for the cache
(bumping up shared buffers is another option...) yet the disk is being
highly utilized according to systat.
From: | Shridhar Daithankar <shridhar_daithankar(at)persistent(dot)co(dot)in> |
---|---|
To: | Vivek Khera <khera(at)kcilink(dot)com>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: go for a script! / ex: PostgreSQL vs. MySQL |
Date: | 2003-10-13 14:14:55 |
Message-ID: | 200310131944.55273.shridhar_daithankar@persistent.co.in |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-performance |
On Monday 13 October 2003 19:34, Vivek Khera wrote:
> >>>>> "SC" == Sean Chittenden <sean(at)chittenden(dot)org> writes:
> >>
> >> echo "effective_cache_size = $((`sysctl -n vfs.hibufspace` / 8192))"
> >>
> >> I've used it for my dedicated servers. Is this calculation correct?
>
> SC> Yes, or it's real close at least. vfs.hibufspace is the amount of
> SC> kernel space that's used for caching IO operations (minus the
>
> I'm just curious if anyone has a tip to increase the amount of memory
> FreeBSD will use for the cache? It appears to me that even on my 2Gb
> box, lots of memory is 'free' that could be used for the cache
> (bumping up shared buffers is another option...) yet the disk is being
> highly utilized according to systat.
Is this of any help?..reverse video sucks though.. especially spec'ed person
like me..
http://unix.derkeiler.com/Mailing-Lists/FreeBSD/performance/2003-07/0073.html
Shridhar
From: | ingrim <ingridm(at)qoslabs(dot)com> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org |
Subject: | unsuscribe mailing list |
Date: | 2003-10-13 14:38:25 |
Message-ID: | 002601c39197$ac832170d64a8c0@ingridma |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-performance |
-----Original Message-----
From: pgsql-performance-owner(at)postgresql(dot)org
[mailto:pgsql-performance-owner(at)postgresql(dot)org] On Behalf Of Vivek Khera
Sent: Viernes, 10 de Octubre de 2003 03:14 p.m.
To: Josh Berkus
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: [PERFORM] go for a script! / ex: PostgreSQL vs. MySQL
>>>>> "JB" == Josh Berkus <josh(at)agliodbs(dot)com> writes:
JB> Vivek,
NB> shared_buffers = 1/16th of total memory
NB> effective_cache_size = 80% of the supposed kernel cache.
>>
>> Please take into account the blocksize compiled into PG, too...
JB> We can;t change the blocksize in a script that only does the .conf
JB> file. Or are you suggesting something else?
when you compute optimal shared buffers and effective cache size,
these are in terms of blocksize. so if I have 16k block size, you
can't compute based on default 8k blocksize. at worst, it would have
to be a parameter you pass to the tuning script.
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings
From: | Vivek Khera <khera(at)kcilink(dot)com> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: go for a script! / ex: PostgreSQL vs. MySQL |
Date: | 2003-10-13 15:37:53 |
Message-ID: | x7brslp2r2.fsf@yertle.int.kciLink.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-performance |
>>>>> "CK" == Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
>> If shmmax and shmmall are too small, then:
>> PostgreSQL requires some more shared memory to cache some tables, x
>> Mb, do you want to increase your OS kernel parameters?
>> Tweak shmmax and shmmall
CK> Note that this still requires a kernel recompile on FreeBSD :(
According to whom? sysctl is your friend. Some sysctl settings may
require reboot, but I don't think the SHM ones do.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D. Khera Communications, Inc.
Internet: khera(at)kciLink(dot)com Rockville, MD +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera http://www.khera.org/~vivek/
From: | Vivek Khera <khera(at)kcilink(dot)com> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: go for a script! / ex: PostgreSQL vs. MySQL |
Date: | 2003-10-13 15:39:03 |
Message-ID: | x77k39p2p4.fsf@yertle.int.kciLink.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-performance |
>>>>> "JB" == Josh Berkus <josh(at)agliodbs(dot)com> writes:
JB> Chris,
>> > PostgreSQL requires some more shared memory to cache some tables, x Mb,
>> > do you want to increase your OS kernel parameters?
>> >
>> > Tweak shmmax and shmmall
>>
>> Note that this still requires a kernel recompile on FreeBSD :(
JB> Not our fault, now is it? This would mean that we wouldn't be
JB> able to script for FreeBSD. Bug the FreeBSD developers.
"I read it on the net so it must be true" applies here. You /can/ set
these values via sysctl calls.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D. Khera Communications, Inc.
Internet: khera(at)kciLink(dot)com Rockville, MD +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera http://www.khera.org/~vivek/
From: | Sean Chittenden <sean(at)chittenden(dot)org> |
---|---|
To: | Vivek Khera <khera(at)kcilink(dot)com> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: go for a script! / ex: PostgreSQL vs. MySQL |
Date: | 2003-10-13 19:04:46 |
Message-ID: | 20031013190446.GA72842@perrin.nxad.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-performance |
> >> echo "effective_cache_size = $((`sysctl -n vfs.hibufspace` / 8192))"
> >>
> >> I've used it for my dedicated servers. Is this calculation correct?
>
> SC> Yes, or it's real close at least. vfs.hibufspace is the amount
> of SC> kernel space that's used for caching IO operations (minus the
>
> I'm just curious if anyone has a tip to increase the amount of
> memory FreeBSD will use for the cache?
Recompile your kernel with BKVASIZE set to 4 times its current value
and double your nbuf size. According to Bruce Evans:
"Actually there is a way: the vfs_maxbufspace gives the amount of
space reserved for buffer kva (= nbuf * BKVASIZE). nbuf is easy to
recover from this, and the buffer kva space may be what is wanted
anyway."
[snip]
"I've never found setting nbuf useful, however. I want most
parametrized sizes including nbuf to scale with resource sizes, and
it's only with RAM sizes of similar sizes to the total virtual address
size that its hard to get things to fit. I haven't hit this problem
myself since my largest machine has only 1GB. I use an nbuf of
something like twice the default one, and a BKVASIZE of 4 times the
default. vfs.maxbufspace ends up at 445MB on the machine with 1GB, so
it is maxed out now."
YMMV.
-sc
--
Sean Chittenden
From: | Sean Chittenden <sean(at)chittenden(dot)org> |
---|---|
To: | Josh Berkus <josh(at)agliodbs(dot)com> |
Cc: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Nick Barr <nicky(at)chuckie(dot)co(dot)uk>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: go for a script! / ex: PostgreSQL vs. MySQL |
Date: | 2003-10-13 19:10:23 |
Message-ID: | 20031013191023.GB72842@perrin.nxad.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-performance |
> > > PostgreSQL requires some more shared memory to cache some
> > > tables, x Mb, do you want to increase your OS kernel parameters?
> > >
> > > Tweak shmmax and shmmall
> >
> > Note that this still requires a kernel recompile on FreeBSD :(
>
> Not our fault, now is it? This would mean that we wouldn't be able
> to script for FreeBSD. Bug the FreeBSD developers.
And if you do so, you're going to hear that shm* is an antiquated
interface that's dated, slow, inefficient and shouldn't be used. :)
Every few months one of the uber core BSD hackers threatens to rewrite
that part of PG because high up in the BSD camp, it's common belief
that shm* is a source of performance loss for PostgreSQL. One of
these days it'll happen, probably with mmap() mmap()'ing MAP_SHARED
files stored in a $PGDATA/data/shared dir as mmap() is by far and away
the fastest shared memory mechanism and certainly is very widely
deployed (I would be surprised if any of the supported PG platforms
didn't have mmap()).
-sc
--
Sean Chittenden
From: | Christopher Browne <cbbrowne(at)acm(dot)org> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: go for a script! / ex: PostgreSQL vs. MySQL |
Date: | 2003-10-13 23:58:36 |
Message-ID: | m3smlw666r.fsf@wolfe.cbbrowne.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-performance |
Centuries ago, Nostradamus foresaw when khera(at)kcilink(dot)com (Vivek Khera) would write:
>>>>>> "JB" == Josh Berkus <josh(at)agliodbs(dot)com> writes:
>
> JB> Chris,
>>> > PostgreSQL requires some more shared memory to cache some tables, x Mb,
>>> > do you want to increase your OS kernel parameters?
>>> >
>>> > Tweak shmmax and shmmall
>>>
>>> Note that this still requires a kernel recompile on FreeBSD :(
>
> JB> Not our fault, now is it? This would mean that we wouldn't be
> JB> able to script for FreeBSD. Bug the FreeBSD developers.
>
> "I read it on the net so it must be true" applies here. You /can/ set
> these values via sysctl calls.
Yes, indeed, sysctl can tweak these values fairly adequately.
Now, numbers of semaphors are not as readily tweaked; I wound up
limited, the other day, when I tried setting values for...
kern.ipc.semmns
kern.ipc.semmni
--
let name="cbbrowne" and tld="ntlug.org" in String.concat "@" [name;tld];;
http://www.ntlug.org/~cbbrowne/x.html
"So, when you typed in the date, it exploded into a sheet of blue
flame and burned the entire admin wing to the ground? Yes, that's a
known bug. We'll be fixing it in the next release. Until then, try not
to use European date format, and keep an extinguisher handy."
-- slam(at)pobox(dot)com (Tequila Rapide)
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Sean Chittenden <sean(at)chittenden(dot)org> |
Cc: | Josh Berkus <josh(at)agliodbs(dot)com>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Nick Barr <nicky(at)chuckie(dot)co(dot)uk>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: go for a script! / ex: PostgreSQL vs. MySQL |
Date: | 2003-10-14 00:11:55 |
Message-ID: | 3816.1066090315@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-performance |
Sean Chittenden <sean(at)chittenden(dot)org> writes:
> Every few months one of the uber core BSD hackers threatens to rewrite
> that part of PG because high up in the BSD camp, it's common belief
> that shm* is a source of performance loss for PostgreSQL.
They're full of it. RAM is RAM, no? Once you've got the memory mapped
into your address space, it's hard to believe that it matters how you
got hold of it.
In any case, mmap doesn't have the semantics we need. See past
discussions.
regards, tom lane
From: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
---|---|
To: | Vivek Khera <khera(at)kcilink(dot)com> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: go for a script! / ex: PostgreSQL vs. MySQL |
Date: | 2003-10-14 01:29:56 |
Message-ID: | 3F8B5194.1000106@familyhealth.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-performance |
>>>If shmmax and shmmall are too small, then:
>>>PostgreSQL requires some more shared memory to cache some tables, x
>>>Mb, do you want to increase your OS kernel parameters?
>>>Tweak shmmax and shmmall
>
>
> CK> Note that this still requires a kernel recompile on FreeBSD :(
>
> According to whom? sysctl is your friend. Some sysctl settings may
> require reboot, but I don't think the SHM ones do.
Hmmm...you may be right - I can't prove it now...
houston# sysctl -w kern.ipc.shmmax=99999999999
kern.ipc.shmmax: 33554432 -> 2147483647
Hrm. Ok. Maybe they've changed that in some recent version :)
Chris
From: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
---|---|
To: | Christopher Browne <cbbrowne(at)acm(dot)org> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: go for a script! / ex: PostgreSQL vs. MySQL |
Date: | 2003-10-14 01:43:29 |
Message-ID: | 3F8B54C1.5090206@familyhealth.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-general pgsql-performance |
>
> Yes, indeed, sysctl can tweak these values fairly adequately.
>
> Now, numbers of semaphors are not as readily tweaked; I wound up
> limited, the other day, when I tried setting values for...
>
> kern.ipc.semmns
> kern.ipc.semmni
Same. Maybe that was the option I was thinking was read-only:
houston# sysctl kern.ipc.semmns
kern.ipc.semmns: 60
houston# sysctl -w kern.ipc.semmns=70
sysctl: oid 'kern.ipc.semmns' is read only
houston# sysctl kern.ipc.semmni
kern.ipc.semmni: 10
houston# sysctl -w kern.ipc.semmni=30
sysctl: oid 'kern.ipc.semmni' is read only
I like how they use oids :P
Chris