Search Postgresql Archives

Re: Server load statistics

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hallöchen!

Andreas Kretschmer writes:

> Torsten Bronger <bronger@xxxxxxxxxxxxxxxxxxxxx> wrote:
>
>> I need statistics about the PG server load.  At the moment, I use
>> for this
>> 
>> SELECT tup_returned + tup_fetched + tup_inserted + tup_updated +
>>      tup_deleted FROM pg_stat_database WHERE datname='mydb';
>> 
>> However, the figures are absurdly high (> 100.000 rows per second).
>
> [...] And yes, a update is a delete and a insert. With your query
> you get 3 rows per one singel update (tup_updated + tup_deleted +
> tup_inserted). That's maybe not that what you expected.

Thank you, I will correct this.

> Not to mention, every operation affects the system-tables, so one
> single update, for instance, procude more than 3 table-operations.

But so many?  My web application reports 10 new objects per second.
Of course, these are "compound" objects.  They consist of at most 10
single table entries.  This makes 100 rows/s.  With further tables
being affected (news feed queue, table of last modifications etc),
let's assume 300 rows/s.  Then, with your above remark, we get to
1000 rows/s.  But this is a very much streched upper estimate.

I measure 180.000 rows/s.  Thus, it is still too high by a factor of
180.  Even if the server is not contacted at all, it's at 50 rows/s
just for its admistrative work.

Tschö,
Torsten.

-- 
Torsten Bronger, aquisgrana, europa vetus
                   Jabber ID: torsten.bronger@xxxxxxxxxxxxxxxxxxxxx
                                  or http://bronger-jmp.appspot.com


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux