pg_test_fsync
Описание
Программа pg_test_fsync предназначена для того, чтобы дать вам представление о том, какой из вариантов wal_sync_method оптимален для вашей конкретной системы, а также выдать вспомогательные диагностические сведения в случае проблем со вводом/выводом. Однако отличия, показанные программой pg_test_fsync, могут не оказывать большого влияния на реальную производительность баз данных, в частности потому, что для многих серверов баз данных скорость упирается не в запись журналов транзакций. pg_test_fsync выводит среднее время операции синхронизации с ФС для каждого метода wal_sync_method, что также может быть полезно при поиске оптимального значения commit_delay.
Параметры
pg_test_fsync принимает следующие параметры командной строки:
- -f
--filename Задаёт имя файла для записи данных тестов. Этот файл должен находиться в той же файловой системе, где размещается или будет размещаться каталог pg_xlog. (В каталоге pg_xlog содержатся файлы WAL.) По умолчанию выбирается файл pg_test_fsync.out в текущем каталоге.
- -s
--secs-per-test Задаёт продолжительность каждого теста (в секундах). Чем больше длится тест, тем точнее результат, но тем дольше работает программа. Со значением по умолчанию (5 секунд) программа должна завершиться примерно за 2 минуты.
- -V
--version Вывести версию pg_test_fsync и завершиться.
- -?
--help Вывести справку об аргументах командной строки pg_test_fsync и завершиться.
| Пред. | Начало | След. |
| pg_standby | Уровень выше | pg_test_timing |
pg_test_fsync
Description
pg_test_fsync is intended to give you a reasonable idea of what the fastest wal_sync_method is on your specific system, as well as supplying diagnostic information in the event of an identified I/O problem. However, differences shown by pg_test_fsync might not make any significant difference in real database throughput, especially since many database servers are not speed-limited by their transaction logs. pg_test_fsync reports average file sync operation time in microseconds for each wal_sync_method, which can also be used to inform efforts to optimize the value of commit_delay.
Options
pg_test_fsync accepts the following command-line options:
- -f
--filename Specifies the file name to write test data in. This file should be in the same file system that the pg_xlog directory is or will be placed in. (pg_xlog contains the WAL files.) The default is pg_test_fsync.out in the current directory.
- -s
--secs-per-test Specifies the number of seconds for each test. The more time per test, the greater the test's accuracy, but the longer it takes to run. The default is 5 seconds, which allows the program to complete in under 2 minutes.
- -V
--version Print the pg_test_fsync version and exit.
- -?
--help Show help about pg_test_fsync command line arguments, and exit.