0

We use HammerDB/PostgreSQL for Hardware performance characterization. The PostgreSQL database is tuned to showcase the best hardware performance (checkpoint set to 1hr, min_wal_size as 256GB, max_wal_size as 500GB, etc.). The HammerDB workload is set up with 1000 warehouses. We run HammerDB only for 10-15 minutes.

Our database is mounted on a separate disk (at /mnt/data). While running the HammerDB workload for the particular VM setting (at high enough virtual Users), I see the data disk size increase around 0.5 to 1GB/min. The majority of that growth comes from the directory (/mnt/data/13/main/base), followed by pg_subtrans and pg_stat_tmp. Given we are running a workload for a short enough duration and within the WAL limit, I assumed all the transactions will be written to the WAL only, which means only the WAL directory (/mnt/data/13/main/pg_wal) would show growth. But instead it looks like the database is actually growing. Please help me fill in the gaps in my understanding. Thank You

1
  • 1
    Why wouldn't the database(~/base/)grow in size? WAL are just the log files, the data itself is going into the table files which are under ~/base/. At some point, assuming correct setup, unneeded WAL files will be recycled. The data itself will persist minus dead tuples reclaimed by (AUTO)VACUUM. Commented May 23, 2024 at 14:54

1 Answer 1

2

When a table is extended by a page, that new zero page is always written to the datafile immediately. This way an out-of-space condition is detected immediately, not just later when the data needs to get checkpointed.

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.