Re: libpq compression - Mailing list pgsql-hackers

From Konstantin Knizhnik
Subject Re: libpq compression
Date
Msg-id 9d33e21e-54b2-fcf3-b90f-ced286df00c5@postgrespro.ru
Whole thread Raw
In response to Re: libpq compression  (Daniil Zakhlystov <usernamedt@yandex-team.ru>)
Responses Re: libpq compression  (Matthias van de Meent <boekewurm+postgres@gmail.com>)
List pgsql-hackers
It seems to be very important to be able to measure network traffic 
between client and server, especially in case of using compression.
Althought there are a lot of toll for monitoring network traffix for 
Linux and other OSes,  I didn't find one which can easily calculate 
traffix for particular backends.
This is why I have added pg_stat_network_traffic view which can be used 
to measure efficiency of protocol message compression for different 
algorithms and workloads.

This is the result of network traffic of two backends one with enabled 
compression and another with disable compression
after execution of "select * from pg_class" command:

select * from pg_stat_network_traffic;
   pid  | rx_raw_bytes | tx_raw_bytes | rx_compressed_bytes | 
tx_compressed_bytes
-------+--------------+--------------+---------------------+---------------------
  22272 |            0 |            0 |                   0 
|                   0
  22274 |            0 |            0 |                   0 
|                   0
  22276 |           29 |        86327 |                  38 
|               10656
  22282 |           73 |        86327 |                   0 
|                   0
  22270 |            0 |            0 |                   0 
|                   0
  22269 |            0 |            0 |                   0 
|                   0
  22271 |            0 |            0 |                   0 
|                   0
(7 rows)


-- 
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company


Attachment

pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: [patch] [doc] Clarify temporary table name shadowing in CREATE TABLE
Next
From: Andrew Dunstan
Date:
Subject: Re: Support for NSS as a libpq TLS backend