Re: Tuning for PostGreSQL Database

From: Christopher Weimann (csw_at_k12hq.com)
Date: 07/24/03

  • Next message: Petri Helenius: "cpu performance counters"
    Date: Thu, 24 Jul 2003 13:39:10 -0400
    To: Terry Lambert <tlambert2@mindspring.com>
    
    

    On Wed 07/23/2003-11:55:25PM -0700, Terry Lambert wrote:
    >
    > > The question I have is: can pages in the inactive queue be used as disk
    > > cache?
    >
    > The answer is "yes, they can be reactivated and written to before
    > they are flushed if soft updates is enabled" and "yes, they can be
    > reactivated and read (but not written) to before they are flushed
    > if soft updates is not enabled".
    >
    > In general, this only happens for data pages, which is to say, the
    > pages containing user file data. Pages containing FS metadata are
    > specifically considered as "write through" or "virtually write
    > through".
    >
    > It doesn't happen for data pages, if they are explicitly fsync'ed
    > to ensure write ordering is guaranteed.
    >

    So if PostGreSQL uses fsync when writing ( which I think is only true
    on the write-ahead logs at this point ) that data will NOT wind up in
    the cache. Anything that PostGreSQL reads should wind up in the cache?

    #uname -r
    4.7-RELEASE-p3

    # top -b | head -5
    last pid: 58622; load averages: 1.96, 1.67, 1.47 up 2+12:59:15 13:31:39
    130 processes: 6 running, 124 sleeping

    Mem: 348M Active, 2628M Inact, 438M Wired, 155M Cache, 380M Buf, 76M Free
    Swap: 4096M Total, 28K Used, 4096M Free

    The 2628M Inact is likley to be acting as cache?

    Basically I should stop worrying about this :)

    _______________________________________________
    freebsd-performance@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-performance
    To unsubscribe, send any mail to "freebsd-performance-unsubscribe@freebsd.org"


  • Next message: Petri Helenius: "cpu performance counters"

    Relevant Pages

    • Re: Tuning for PostGreSQL Database
      ... > memory area. ... It is wasteful for the DBMS and the OS to both cache this ... You'll want the PostgreSQL shared memory size to be around 75% the ... > size of RAM. ...
      (freebsd-performance)
    • Re: Purchasing the correct hardware: dual-core intel? Big cache?
      ... Depending on where you got the PostgreSQL, was it in binary form or source. ... While a bigger cache may help, as may dual core CPU's, or faster CPU's. ... Poor optimization causes a CPU to chug along, ... MailScanner thanks transtec Computers for their support. ...
      (freebsd-questions)
    • Re: Tuning for PostGreSQL Database
      ... Anything that PostGreSQL reads should wind up in the cache? ... It is wasteful for the DBMS and the OS to both cache this ... You'll want the PostgreSQL shared memory size to be around 75% the ...
      (freebsd-performance)
    • Re: Purchasing the correct hardware: dual-core intel? Big cache?
      ... Poor optimization causes a CPU to chug along, flushing the CPU cache ... The database server is PostgreSQL. ...
      (freebsd-questions)
    • Page Caching, MVCC, Postgresql
      ... PostgreSQL because it was not displaying the latest changes, ... Turns out it had nothing to do with MVCC feature in ... cache and other pages to not. ...
      (comp.lang.php)

  • Quantcast