Skip to content

Commit

Permalink
[yugabyte#21963] YSQL: Configure clockbound agent
Browse files Browse the repository at this point in the history
  • Loading branch information
pao214 committed Oct 15, 2024
1 parent 3f7333a commit bb3f099
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions docs/content/preview/deploy/manual-deployment/system-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ In particular, the main YugabyteDB process, the YB-TServer, is multi-threaded. A

## ntp

YugabyteDB relies on clock synchronization to guarantee consistency in distributed transactions.

If your instance does not have public Internet access, make sure the ntp package is installed:

```sh
Expand All @@ -35,6 +37,35 @@ As of CentOS 8, `ntp` is no longer available and has been replaced by `chrony`.
$ sudo yum install -y chrony
```

### PHC (PTP Hardware Clock)

**Supported Platforms:** AWS

{{<tags/feature/tp>}} PTP Hardware Clock (PHC) refers to a physical clock device that supports the [Precision Time Protocol (PTP)](https://en.wikipedia.org/wiki/Precision_Time_Protocol), which is a network protocol used for highly accurate time synchronization.

To check if your AWS instance supports PHC, see [AWS PTP Hardware Clock](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configure-ec2-ntp.html#connect-to-the-ptp-hardware-clock).

Configure PTP using the `configure_ptp.sh` script in the bin directory of your YugabyteDB home directory as follows:

```sh
sudo bash ./bin/configure_ptp.sh
```

### Clockbound Agent

{{<tags/feature/tp>}} Although optional, configuring a clockbound agent improves clock accuracy significantly.
While PHC is beneficial, it is not required for configuring clockbound. However, Chrony is a necessary prerequisite.

Configure a clockbound agent using the `configure_clockbound.sh` script in the bin directory of your YugabyteDB home directory as follows:

```sh
sudo bash ./bin/configure_clockbound.sh
```

After configuring a clockbound agent, you must configure the [YB-TServer](../start-tservers/) and [YB-Master](../start-masters/) servers with the `time_source=clockbound` flag.

If the clockbound agent is configured with PHC, use a more aggressive clock error estimate such as `clockbound_clock_error_estimate_usec=100`.

## ulimits

In Linux, `ulimit` is used to limit and control the usage of system resources (threads, files, and network connections) on a per-process or per-user basis.
Expand Down

0 comments on commit bb3f099

Please sign in to comment.