0

I am currently working on an EC2 instance on AWS with EBS volume and I got an alert because I have constant I/O consumption even when server is idling.

the iotop command shows:

TID  PRIO  USER     DISK READ  DISK WRITE  SWAPIN      IO    COMMAND
160 be/3 root          0.00 B     27.58 M  0.00 %  0.06 % [jbd2/xvda1-8]
10016 be/4 root          0.00 B      0.00 B  0.00 %  0.00 % [flush-202:1]
10014 be/4 postgres      0.00 B    947.35 M  0.00 %  0.00 % postgres: stats collector     process
 534 be/4 root          0.00 B    136.00 K  0.00 %  0.00 % dhclient3 -e IF_METRIC=100 -pf /var/run/dhclient.eth0.pid -lf /var/lib/dhcp/dhclient.eth0.leases -1 eth0

The postgresql run with postgis extension, the database is almost empty, so I really don't know why it is constantly collecting stats, sometimes there is also a postgres writting process. Another thing is the Jbd2 (ext4 journal) process which also constantly using I/O

2
  • What version of postgresql are you using? How many databases do you have running in the postgresql server, and how many objects? What is in your pg_stat_tmp directory (under the postgresql data directory)? Commented Sep 8, 2013 at 21:26
  • Postgres version is 9.1, I have only one very small DB on it. I solved a part of this problem moving the pg_stat_directory to a ramdisk Commented Sep 9, 2013 at 11:46

1 Answer 1

1

The best answer would be that if you can have another volume to move the journal onto another volume. EXT4 sees much better throughput in that case.

What's probably happening is that you have a small database under some degree of general load, and autovacuum is running in the background. Autovacuum will analyze used tables and write data to the stats tables periodically.

If the load is low, you may be able to tweak your autovacuum settings to avoid the problem as well.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.