Em Seg, 2009-03-09 às 13:55 +0900, ITAGAKI Takahiro escreveu:
> Therefore, I'd like to propose an profiler with sampling approach in 8.5.
> The attached patch is an experimental model of the profiler.
> Each backends reports its condtion in PgBackendStatus.st_condition
> and the stats collector process does polling them every seconds.
Hi Takahiro!
Compiled and Works fine here on Ubuntu 8.04 2.6.25.15-bd-mod #1 SMP
PREEMPT Thu Nov 27 10:05:44 BRST 2008 i686 GNU/Linux
dba@analise3:/srv/postgresql/HEAD$ ./bin/pgbench -i -s3
dba@analise3:/srv/postgresql/HEAD$ ./bin/pgbench -i -s3 -d postgres
transaction type: TPC-B (sort of)
scaling factor: 3
query mode: simple
number of clients: 4
duration: 60 s
number of transactions actually processed: 3730
tps = 62.090946 (including connections establishing)
tps = 62.112183 (excluding connections establishing)
dba@analise3:/srv/postgresql/HEAD$ ./bin/psql -c "SELECT * FROM
pg_diff_profiles" -d postgresprofid | profname | percent
--------+------------------+--------- 15 | Network:Recv | 50.45 16 | Network:Send | 24.55 32 |
Lock:Transaction| 7.14 3 | CPU | 5.80 20 | XLog:Flush | 3.13 31 | Lock:Tuple
| 2.68 7 | CPU:Execute | 1.79 6 | CPU:Plan | 1.79 46 | LWLock:WALWrite | 1.34
11| CPU:Commit | 0.89 19 | XLog:Write | 0.45
(11 rows)
Two questions here:
1) How will be this behavior in a syncrep environment? I don't have one
here to test this, yet.
2) I couldn't find a clear way to disable it. There is one in this patch
or are you planning this to future?
Regards,
--
Dickson S. Guedes
mail/xmpp: guedes@guedesoft.net - skype: guediz
http://guedesoft.net - http://planeta.postgresql.org.br