Re: Mostly read performance - Mailing list pgsql-performance

From Jeffrey Tenny
Subject Re: Mostly read performance
Date
Msg-id 42FBDB97.1010906@comcast.net
Whole thread Raw
In response to Re: Mostly read performance  (John A Meinel <john@arbash-meinel.com>)
Responses Re: Mostly read performance
List pgsql-performance
John A Meinel wrote:
  > Well, first off, the general recommendation is probably that 7.3 is
> really old, and you should try to upgrade to at least 7.4, though
> recommended to 8.0.

There have been issues with each release that led me to wait.
Even now I'm waiting for some things to settle in the 8.0 JDBC driver
(timezones), and 7.3 has behaved well for me.  But yes, I'd like to upgrade.

>
> The bigger questions: How much RAM do you have? How busy is your system?

The system for testing was 512MB.  I'm in the process of buying some
additional memory.  However there was no swap activity on that system,
so I doubt memory was the limiting factor.

>
> 8.0 doesn't really do anything to do make the system cache the data.
> What kernel are you using?

2.4.X for various large x.  (Multiple systems).  Gonna try 2.6.x soon.

>
> Also, if your tables are small enough, and your RAM is big enough, you
> might already have everything cached.

Well, that's what you'd expect.  But a first time 70MB fetch on a
freshly rebooted system took just as long as all secondary times.  (Took
over a minute to fetch, which is too long for my needs, at least on
secondary attempts).

> One way to flush the caches, is to allocate a bunch of memory, and then
> scan through it. Or maybe mmap a really big file, and access every byte.
> But if your kernel is smart enough, it could certainly deallocate pages
> after you stopped accessing them, so I can't say for sure that you can
> flush the memory cache. Usually, I believe these methods are sufficient.

Not sure how that would really help.  It doesn't seem like the database
or file system is caching the table content either way, which led me to
this inquiry.

pgsql-performance by date:

Previous
From: John A Meinel
Date:
Subject: Re: Mostly read performance
Next
From: John A Meinel
Date:
Subject: Re: Odd Locking Problem