Determining server load from client

From: Dan Harris
Subject: Determining server load from client
Date: ,
Msg-id: 460080A2.20800@drivefaster.net
(view: Whole thread, Raw)
Responses: Re: Determining server load from client  ("Craig A. James")
Re: Determining server load from client  (Joe Healy)
Re: Determining server load from client  (Dan Harris)
Re: Determining server load from client  ("Jim Buttafuoco")
List: pgsql-performance

Tree view

Determining server load from client  (Dan Harris, )
 Re: Determining server load from client  ("Craig A. James", )
 Re: Determining server load from client  (Joe Healy, )
  OT: Munin (was Re: Determining server load from client)  (Richard Huxton, )
   Re: OT: Munin (was Re: Determining server load from client)  (Tobias Brox, )
    Re: OT: Munin (was Re: Determining server load from client)  (Richard Huxton, )
    Re: OT: Munin (was Re: Determining server load from client)  (Erik Jones, )
     Re: OT: Munin (was Re: Determining server load from client)  (Tobias Brox, )
      Re: OT: Munin (was Re: Determining server load from client)  (Erik Jones, )
       Re: OT: Munin (was Re: Determining server load from client)  ("CAJ CAJ", )
        Re: OT: Munin (was Re: Determining server load from client)  (Stefan Kaltenbrunner, )
 Re: Determining server load from client  (Dan Harris, )
 Re: Determining server load from client  ("Jim Buttafuoco", )

I've found that it would be helpful to be able to tell how busy my
dedicated PG server is ( Linux 2.6 kernel, v8.0.3 currently ) before
pounding it with some OLAP-type queries.  Specifically, I have a
multi-threaded client program that needs to run several thousand
sequential queries.  I broke it into threads to take advantage of the
multi-core architecture of the server hardware.  It would be very nice
if I could check the load of the server at certain intervals to throttle
the number of concurrent queries and mitigate load problems when other
processes might be already inducing a significant load.

I have seen some other nice back-end things exposed through PG functions
( e.g. database size on disk ) and wondered if there was anything
applicable to this.  Even if it can't return the load average proper, is
there anything else in the pg_* tables that might give me a clue how
"busy" the server is for a period of time?

I've thought about allowing an ssh login without a keyphrase to log in
and capture it.  But, the client process is running as an apache user.
Giving the apache user a shell login to the DB box does not seem like a
smart idea for obvious security reasons...

So far, that's all I can come up with, other than a dedicated socket
server daemon on the DB machine to do it.

Any creative ideas are welcomed :)

Thanks

-Dan


pgsql-performance by date:

From: "Jim Buttafuoco"
Date:
Subject: Re: Determining server load from client
From: Richard Huxton
Date:
Subject: OT: Munin (was Re: Determining server load from client)