pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feedeffective cache size on FreeBSD (WAS: Performance on SUSE w/ reiserfs)
4+ messages / 3 participants
[nested] [flat]
* effective cache size on FreeBSD (WAS: Performance on SUSE w/ reiserfs)
@ 2005-10-11 14:54 Claus Guttesen <kometen@gmail.com>
2005-10-11 15:04 ` Re: effective cache size on FreeBSD (WAS: Performance on SUSE w/ Sven Willenberger <sven@dmv.com>
2005-10-11 20:09 ` Re: effective cache size on FreeBSD (WAS: Performance on SUSE w/ reiserfs) Vivek Khera <vivek@khera.org>
0 siblings, 2 replies; 4+ messages in thread
From: Claus Guttesen @ 2005-10-11 14:54 UTC (permalink / raw)
To: Sven Willenberger <sven@dmv.com>; +Cc: Jon Brisbin <jon.brisbin@npcinternational.com>; pgsql-performance
> > I have a postgresql 7.4.8-server with 4 GB ram.
> > #effective_cache_size = 1000 # typically 8KB each
> >
> > This is computed by sysctl -n vfs.hibufspace / 8192 (on FreeBSD). So I
> > changed it to:
> >
> > effective_cache_size = 27462 # typically 8KB each
>
> Apparently this formula is no longer relevant on the FreeBSD systems as
> it can cache up to almost all the available RAM. With 4GB of RAM, one
> could specify most of the RAM as being available for caching, assuming
> that nothing but PostgreSQL runs on the server -- certainly 1/2 the RAM
> would be a reasonable value to tell the planner.
>
> (This was verified by using dd:
> dd if=/dev/zero of=/usr/local/pgsql/iotest bs=128k count=16384 to create
> a 2G file then
> dd if=/usr/local/pgsql/iotest of=/dev/null
>
> If you run systat -vmstat 2 you will see 0% diskaccess during the read
> of the 2G file indicating that it has, in fact, been cached)
Thank you for your reply. Does this apply to FreeBSD 5.4 or 6.0 on
amd64 (or both)?
regards
Claus
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: effective cache size on FreeBSD (WAS: Performance on SUSE w/
2005-10-11 14:54 effective cache size on FreeBSD (WAS: Performance on SUSE w/ reiserfs) Claus Guttesen <kometen@gmail.com>
@ 2005-10-11 15:04 ` Sven Willenberger <sven@dmv.com>
2005-10-11 17:23 ` Re: effective cache size on FreeBSD (WAS: Performance on SUSE w/ Claus Guttesen <kometen@gmail.com>
1 sibling, 1 reply; 4+ messages in thread
From: Sven Willenberger @ 2005-10-11 15:04 UTC (permalink / raw)
To: Claus Guttesen <kometen@gmail.com>; +Cc: Jon Brisbin <jon.brisbin@npcinternational.com>; pgsql-performance
On Tue, 2005-10-11 at 16:54 +0200, Claus Guttesen wrote:
> > > I have a postgresql 7.4.8-server with 4 GB ram.
> > > #effective_cache_size = 1000 # typically 8KB each
> > >
> > > This is computed by sysctl -n vfs.hibufspace / 8192 (on FreeBSD). So I
> > > changed it to:
> > >
> > > effective_cache_size = 27462 # typically 8KB each
> >
> > Apparently this formula is no longer relevant on the FreeBSD systems as
> > it can cache up to almost all the available RAM. With 4GB of RAM, one
> > could specify most of the RAM as being available for caching, assuming
> > that nothing but PostgreSQL runs on the server -- certainly 1/2 the RAM
> > would be a reasonable value to tell the planner.
> >
> > (This was verified by using dd:
> > dd if=/dev/zero of=/usr/local/pgsql/iotest bs=128k count=16384 to create
> > a 2G file then
> > dd if=/usr/local/pgsql/iotest of=/dev/null
> >
> > If you run systat -vmstat 2 you will see 0% diskaccess during the read
> > of the 2G file indicating that it has, in fact, been cached)
>
> Thank you for your reply. Does this apply to FreeBSD 5.4 or 6.0 on
> amd64 (or both)?
>
Not sure about 6.0 (but I don't know why it would change) but definitely
on 5.4 amd64 (and I would imagine i386 as well).
Sven
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: effective cache size on FreeBSD (WAS: Performance on SUSE w/
2005-10-11 14:54 effective cache size on FreeBSD (WAS: Performance on SUSE w/ reiserfs) Claus Guttesen <kometen@gmail.com>
2005-10-11 15:04 ` Re: effective cache size on FreeBSD (WAS: Performance on SUSE w/ Sven Willenberger <sven@dmv.com>
@ 2005-10-11 17:23 ` Claus Guttesen <kometen@gmail.com>
0 siblings, 0 replies; 4+ messages in thread
From: Claus Guttesen @ 2005-10-11 17:23 UTC (permalink / raw)
To: Sven Willenberger <sven@dmv.com>; +Cc: Jon Brisbin <jon.brisbin@npcinternational.com>; pgsql-performance
> > > Apparently this formula is no longer relevant on the FreeBSD systems as
> > > it can cache up to almost all the available RAM. With 4GB of RAM, one
> > > could specify most of the RAM as being available for caching, assuming
> > > that nothing but PostgreSQL runs on the server -- certainly 1/2 the RAM
> > > would be a reasonable value to tell the planner.
> > >
> > > (This was verified by using dd:
> > > dd if=/dev/zero of=/usr/local/pgsql/iotest bs=128k count=16384 to create
> > > a 2G file then
> > > dd if=/usr/local/pgsql/iotest of=/dev/null
> > >
> > > If you run systat -vmstat 2 you will see 0% diskaccess during the read
> > > of the 2G file indicating that it has, in fact, been cached)
> >
> > Thank you for your reply. Does this apply to FreeBSD 5.4 or 6.0 on
> > amd64 (or both)?
> >
>
> Not sure about 6.0 (but I don't know why it would change) but definitely
> on 5.4 amd64 (and I would imagine i386 as well).
Works on FreeBSD 6.0 RC1 as well. Tried using count=4096 on a 1 GB ram
box. Same behaviour as you describe above.
regards
Claus
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: effective cache size on FreeBSD (WAS: Performance on SUSE w/ reiserfs)
2005-10-11 14:54 effective cache size on FreeBSD (WAS: Performance on SUSE w/ reiserfs) Claus Guttesen <kometen@gmail.com>
@ 2005-10-11 20:09 ` Vivek Khera <vivek@khera.org>
1 sibling, 0 replies; 4+ messages in thread
From: Vivek Khera @ 2005-10-11 20:09 UTC (permalink / raw)
To: pgsql-performance
On Oct 11, 2005, at 10:54 AM, Claus Guttesen wrote:
> Thank you for your reply. Does this apply to FreeBSD 5.4 or 6.0 on
> amd64 (or both)?
>
It applies to FreeBSD >= 5.0.
However, I have not been able to get a real answer from the FreeBSD
hacker community on what the max buffer space usage will be to
properly set this. The `sysctl -n vfs.hibufspace` / 8192 estimation
works very well for me, still, and I continue to use it.
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2005-10-11 20:09 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-10-11 14:54 effective cache size on FreeBSD (WAS: Performance on SUSE w/ reiserfs) Claus Guttesen <kometen@gmail.com>
2005-10-11 15:04 ` Re: effective cache size on FreeBSD (WAS: Performance on SUSE w/ Sven Willenberger <sven@dmv.com>
2005-10-11 17:23 ` Re: effective cache size on FreeBSD (WAS: Performance on SUSE w/ Claus Guttesen <kometen@gmail.com>
2005-10-11 20:09 ` Vivek Khera <vivek@khera.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox