[pgpool-hackers: 2795] Re: Reducing amount of debugging messages

Tatsuo Ishii ishii at sraoss.co.jp
Mon May 7 13:10:35 JST 2018


Done.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp

> Currently most of debugging messages are marked as DEBUG1.  As of
> today we have 620 ereport(DEBUG...) lines.  Out of 620 lines, 542 are
> DEBUG1. As a result if enable DEBUG1 message emitted, considerably
> large amount of log file is generated.
> 
> For example if I run pgbench just for 10 seconds:
> 
>     pgbench -p 11000 -c 10 -M extended test
> 
> 18MB of log file is generated. I analyzed the log file to find out
> what debug messages are often used.
> 
> $ grep -v DETAIL pgpool.log > pgpool.log-without-DETAIL 
> $ awk '{print $6}' pgpool.log-without-DETAIL| awk '{count[$0]++}END{for(i in count)print count[i], i}'|sort -nr
> 
> 27265 session
> 21644 pool_virtual_master_db_node_id:
> 18288 pool_write:
> 14785 reading
> 11620 pushing
> 10101 processing
> 10100 read_kind_from_backend:
> 9987 pool_flush_it:
> 6020 pool_wait_till_ready_for_query:
> 3642 read_kind_from_backend
> 3600 pool_pending_message_head_message:
> 3500 pool_pending_message_pull_out:
> 3500 pool_pending_message_add:
> 3146 DB
> 2944 while
> 2800 called
> 2500 Execute:
> 2202 SimpleForwardToFrontend:
> 1963 pool_read:
> 1950 do_query:
> 1560 pool_send_and_wait:
> 1400 pop
> 1380 adding
> 902 checking
> 715 pool_query_context_destroy:
> 715 decide
> 700 Parse:
> 700 Describe:
> 700 Bind:
> 500 parse
> 400 not
> 220 process
> 62 detect
> 54 authenticate
> 49 initializing
> 47 I
> 45 verify_backend_node_status:
> 37 shmem_exit(-1):
> 37 proc_exit(-1):
> 30 authentication
> 24 health
> 21 waiting
> 20 creating
> 12 comparing
> 11 setting
> 11 sending
> 11 selecting
> 11 RESET
> 11 Frontend
> 10 node
> 10 do_command:
> 2 get_server_version:
> 2 function
> 2 find_primary_node:
> 2 backend
> 1 unlogged
> 1 temporary
> 1 system
> 1 pool_coninfo_size:
> 1 pgpool-II
> 1 make
> 1 find_primary_node_repeatedly:
> 1 Setting
> 1 Request
> 1 Recovery
> 1 ProcessInfo:
> 1 Backend
> 
> I have eliminated top 15 or so messages by downgrading them to
> DEBUG5. Now I get 1.1 MB log file for the same pgbench run if I set
> "log_min_messages = DEBUG1".  Attached is the patch for this. I would
> like to commit the patch if there's no objection.
> 
> Best regards,
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese:http://www.sraoss.co.jp


More information about the pgpool-hackers mailing list