Linux command
pg_test_fsync 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Test fsync methods
pg_test_fsync
Test with specific file
pg_test_fsync -f [testfile]
说明
pg_test_fsync benchmarks the fsync/flush methods available on the current platform, reporting operations-per-second for each. The results guide the choice of PostgreSQL's `wal_sync_method` (e.g. `fsync`, `fdatasync`, `open_sync`, `open_datasync`). Run it on the actual filesystem hosting WAL to get meaningful numbers; cached or virtualized storage will distort results.
参数
- -f, --filename _file_
- Test file path.
- -s, --secs-per-test _n_
- Seconds per test.
FAQ
What is the pg_test_fsync command used for?
pg_test_fsync benchmarks the fsync/flush methods available on the current platform, reporting operations-per-second for each. The results guide the choice of PostgreSQL's `wal_sync_method` (e.g. `fsync`, `fdatasync`, `open_sync`, `open_datasync`). Run it on the actual filesystem hosting WAL to get meaningful numbers; cached or virtualized storage will distort results.
How do I run a basic pg_test_fsync example?
Run `pg_test_fsync` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -f, --filename _file_ do in pg_test_fsync?
Test file path.