Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: 300 seconds in less than 1 second with pg_autovacuum


  • From: "Harald Massa" <ghum(at)gmx(dot)net>
  • To: "Harald Massa" <ghum(at)gmx(dot)net>
  • Cc: pgsql-hackers-win32(at)postgresql(dot)org
  • Subject: Re: 300 seconds in less than 1 second with pg_autovacuum
  • Date: Fri, 21 Jan 2005 14:02:22 +0100 (MET)
  • Message-id: <16277(dot)1106312542(at)www40(dot)gmx(dot)net>

Updating myself: to "300 seconds in less than 1 second"...

I thought of the usual parameter problems, and ....

[2005-01-21 13:56:59 Westeuropäische Normalzeit] INFO:    pg_autovacuum
starting in Windows Service mode
[2005-01-21 13:57:21 Westeuropäische Normalzeit] INFO:    pg_autovacuum
service stopping...
[2005-01-21 13:57:42 Westeuropäische Normalzeit] INFO:    Printing
command_args
[2005-01-21 13:57:42 Westeuropäische Normalzeit] INFO:     
args->host=(null)
[2005-01-21 13:57:42 Westeuropäische Normalzeit] INFO:     
args->port=(null)
[2005-01-21 13:57:42 Westeuropäische Normalzeit] INFO:     
args->username=postgres
[2005-01-21 13:57:42 Westeuropäische Normalzeit] INFO:     
args->password=faghimwyo
[2005-01-21 13:57:42 Westeuropäische Normalzeit] INFO:     
args->logfile=c:\ghum\data\pg_log\autovacuum.log
[2005-01-21 13:57:42 Westeuropäische Normalzeit] INFO:     
args->install_as_service=0
[2005-01-21 13:57:42 Westeuropäische Normalzeit] INFO:     
args->remove_as_service=0
[2005-01-21 13:57:42 Westeuropäische Normalzeit] INFO:     
args->service_dependencies=(null)
[2005-01-21 13:57:42 Westeuropäische Normalzeit] INFO:     
args->service_user=(null)
[2005-01-21 13:57:42 Westeuropäische Normalzeit] INFO:     
args->service_password=(null)
[2005-01-21 13:57:42 Westeuropäische Normalzeit] INFO:     
args->sleep_base_value=30000
[2005-01-21 13:57:42 Westeuropäische Normalzeit] INFO:     
args->sleep_scaling_factor=2.000000
[2005-01-21 13:57:42 Westeuropäische Normalzeit] INFO:     
args->vacuum_base_threshold=1000
[2005-01-21 13:57:42 Westeuropäische Normalzeit] INFO:     
args->vacuum_scaling_factor=2.000000
[2005-01-21 13:57:42 Westeuropäische Normalzeit] INFO:     
args->analyze_base_threshold=500
[2005-01-21 13:57:42 Westeuropäische Normalzeit] INFO:     
args->analyze_scaling_factor=1.000000
[2005-01-21 13:57:42 Westeuropäische Normalzeit] INFO:     
args->av_vacuum_cost_delay=(default)
[2005-01-21 13:57:42 Westeuropäische Normalzeit] INFO:     
args->av_vacuum_cost_page_hit=(default)
[2005-01-21 13:57:42 Westeuropäische Normalzeit] INFO:     
args->av_vacuum_cost_page_miss=(default)
[2005-01-21 13:57:42 Westeuropäische Normalzeit] INFO:     
args->av_vacuum_cost_page_dirty=(default)
[2005-01-21 13:57:42 Westeuropäische Normalzeit] INFO:     
args->av_vacuum_cost_limit=(default)
[2005-01-21 13:57:42 Westeuropäische Normalzeit] INFO:      args->debug=3
[2005-01-21 13:57:42 Westeuropäische Normalzeit] INFO:    pg_autovacuum
starting in Windows Service mode
[2005-01-21 13:57:42 Westeuropäische Normalzeit] INFO:    dbname: template1
[2005-01-21 13:57:42 Westeuropäische Normalzeit] INFO:      oid: 1
[2005-01-21 13:57:42 Westeuropäische Normalzeit] INFO:      username:
postgres
[2005-01-21 13:57:42 Westeuropäische Normalzeit] INFO:      password:
Supersecret...
[2005-01-21 13:57:42 Westeuropäische Normalzeit] INFO:      conn is valid,
(connected)
[2005-01-21 13:57:42 Westeuropäische Normalzeit] INFO:         reltuples:
439.000000;  relpages: 6
[2005-01-21 13:57:42 Westeuropäische Normalzeit] INFO:        
curr_analyze_count: 0; curr_vacuum_count: 0
[2005-01-21 13:57:42 Westeuropäische Normalzeit] INFO:        
last_analyze_count: 0; last_vacuum_count: 0
[2005-01-21 13:57:42 Westeuropäische Normalzeit] INFO:        
analyze_threshold: 939; vacuum_threshold: 1878
[......]
[2005-01-21 13:57:42 Westeuropäische Normalzeit] INFO:        
analyze_threshold: 500; vacuum_threshold: 1000
[2005-01-21 13:57:42 Westeuropäische Normalzeit] DEBUG:   1 All DBs checked
in: 296000 usec, will sleep for 30000 secs.
[2005-01-21 13:58:13 Westeuropäische Normalzeit] DEBUG:   2 All DBs checked
in: 156000 usec, will sleep for 30000 secs.
[2005-01-21 13:58:43 Westeuropäische Normalzeit] DEBUG:   updating the
database list
[2005-01-21 13:58:43 Westeuropäische Normalzeit] INFO:    dbname: template1
[2005-01-21 13:58:43 Westeuropäische Normalzeit] DEBUG:   3 All DBs checked
in: 281000 usec, will sleep for 30000 secs.
[2005-01-21 13:59:02 Westeuropäische Normalzeit] INFO:    pg_autovacuum
service stopping...



Mutliplied the setting with 100 ... and, indeed, every 30.000 milliseconds
(which is 30 seconds) pg_autovacuum runs.

So, I guess, the sleep() function pg_autovacuum is using takes milliseconds
and not seconds as parameters on win32.

Please change documentation or better patch pg_autovacuum (milliseconds is
WAY TO FINE as a resolution for pg_autovacuum sleeping time)

Harald



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group