|
7 | 7 | ## Demo |
8 | 8 |
|
9 | 9 | Here is a sample output : |
10 | | - |
11 | | -``` |
12 | | -$ postgresqltuner.pl --host=dbhost --database=testdb --user=username --password=qwerty |
13 | | -postgresqltuner.pl version 0.0.3 |
14 | | -Connecting to dbhost:5432 database testdb with user username... |
15 | | -===== OS information ===== |
16 | | -[INFO] OS: Debian GNU/Linux 8 \n \l |
17 | | -[INFO] OS total memory: 15.52 G |
18 | | -[INFO] Running on physical machine |
19 | | -[INFO] Currently used I/O scheduler(s) : cfq |
20 | | -===== General instance informations ===== |
21 | | ------ Version ----- |
22 | | -[WARN] You are using version 9.4.8 which is not the latest version |
23 | | ------ Uptime ----- |
24 | | -[INFO] Service uptime : 108d 01h 13m 13s |
25 | | ------ Databases ----- |
26 | | -[INFO] Database count (except templates): 2 |
27 | | -[INFO] Database list (except templates): postgres testdb |
28 | | ------ Extensions ----- |
29 | | -[INFO] Number of activated extensions : 1 |
30 | | -[INFO] Activated extensions : plpgsql |
31 | | ------ Users ----- |
32 | | -[OK] No user account will expire in less than 7 days |
33 | | -[OK] No user with password=username |
34 | | -[OK] Password encryption is enabled |
35 | | ------ Connection information ----- |
36 | | -[INFO] max_connections: 100 |
37 | | -[INFO] current used connections: 7 (7.00%) |
38 | | -[INFO] 3 are reserved for super user (3.00%) |
39 | | -[INFO] Average connection age : 5d 01h 15m 45s |
40 | | ------ Memory usage ----- |
41 | | -[INFO] work_mem (per connection): 4.00 M |
42 | | -[INFO] shared_buffers: 128.00 M |
43 | | -[INFO] Max memory usage (shared_buffers + max_connections*work_mem): 528.00 M |
44 | | -[INFO] effective_cache_size: 4.00 GB |
45 | | -[INFO] Size of all databases : 37.77 GB |
46 | | -[INFO] PostgreSQL maximum memory usage: 3.32 of system RAM |
47 | | -[WARN] Max possible memory usage for PostgreSQL is less than 60% of system total RAM. On a dedicated host you can increase PostgreSQL buffers to optimize performances. |
48 | | -[INFO] max memory+effective_cache_size is 29.10% of total RAM |
49 | | -[WARN] Increase shared_buffers and/or effective_cache_size to use more memory |
50 | | -[WARN] maintenance_work_mem is less or equal default value. Increase it to reduce maintenance tasks time |
51 | | ------ Logs ----- |
52 | | -[OK] log_hostname is off : no reverse DNS lookup latency |
53 | | -[WARN] log of long queries is desactivated. It will be more difficult to optimize query performances |
54 | | -[OK] log_statement=none |
55 | | ------ Two phase commit ----- |
56 | | -[OK] Currently no two phase commit transactions |
57 | | ------ Autovacuum ----- |
58 | | -[OK] autovacuum is activated. |
59 | | ------ Checkpoint ----- |
60 | | -[WARN] checkpoint_completion_target(0.5) is low |
61 | | ------ Disk access ----- |
62 | | -[OK] fsync is on |
63 | | ------ WAL ----- |
64 | | -[BAD] The wal_level minimal does not allow PITR backup and recovery |
65 | | -===== Database information for database testdb ===== |
66 | | ------ Database size ----- |
67 | | -[INFO] Database testdb total size : 34.47 G |
68 | | -[INFO] Database testdb tables size : 9.75 G (28.28%) |
69 | | -[INFO] Database testdb indexes size : 24.72 G (71.72%) |
70 | | ------ Shared buffer hit rate ----- |
71 | | -[INFO] shared_buffer_heap_hit_rate: 93.74 |
72 | | -[INFO] shared_buffer_toast_hit_rate: 29.60 |
73 | | -[INFO] shared_buffer_tidx_hit_rate: 98.08 |
74 | | -[INFO] shared_buffer_idx_hit_rate: 96.71 |
75 | | -[WARN] Shared buffer idx hit rate is quite good. Increase shared_buffer memory to increase hit rate |
76 | | ------ Indexes ----- |
77 | | -[OK] No invalid indexes |
78 | | -``` |
| 10 | + |
79 | 11 |
|
80 | 12 | ## Use it |
81 | 13 |
|
|
0 commit comments