Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add link compression tutorial #881

Merged
merged 2 commits into from
Aug 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
html: enable-link-compression.html
funnel: Docs
doc_type: Tutorials
category: Manage the rippled Server
subcategory: Configure Peering
blurb: Save bandwidth by compressing peer-to-peer communications.
---
# Enable Link Compression

The `rippled` server can save bandwidth by compressing its [peer-to-peer communications](peer-protocol.html), at a cost of greater CPU usage. If you enable link compression, the server automatically compresses communications with peer servers that also have link compression enabled. [New in: rippled 1.6.0][]

Copy link

@ddibble-rip ddibble-rip Aug 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was wondering how much CPU usage would be saved by this. Makes sense to compress bandwidth if you knew this setting is the norm for most other hosts.

Anyway to recast the last sentence? There's also a repeated "have" in the sentence:

The server uses uncompressed communications with peers who do not have have link compression enabled or do not support link compression.

Something like this, maybe?

Peer-to-peer link compression works only with peer servers that support link compression and have link compression enabled. In the absence of either, your server defaults to uncompressed communications with that peer.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was thinking about it and I decided the best way to rephrase the sentence was to remove it.

It's implied by the previous sentence and awkwardly long pretty much no matter what, so I think in reality it's more likely to confuse people than it is to help.

## Steps

To enable link compression on your server, complete the following steps:

### 1. Edit your `rippled` server's config file.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use the following? Seems weird to add the possessive to rippled, and using "server" is consistent with the other docs.

Edit your rippled server's config file.

```sh
$ vim /etc/opt/ripple/rippled.cfg
```

{% include '_snippets/conf-file-location.md' %}<!--_ -->

### 2. In the config file, add or uncomment the `[compression]` stanza.

To enable compression:

```text
[compression]
true
```

Use `false` to disable compression (the default).

### 3. Restart the `rippled` server

```sh
$ sudo systemctl restart rippled.service
```

After the restart, your server automatically uses link compression with other peers that also have link compression enabled.

## See Also

- [Capacity Planning](capacity-planning.html)
- [Peer Protocol](peer-protocol.html)

<!--{# common link defs #}-->
{% include '_snippets/rippled-api-links.md' %}
{% include '_snippets/tx-type-links.md' %}
{% include '_snippets/rippled_versions.md' %}
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
---
html: capacity-planning.html
funnel: Docs
doc_type: Tutorials
category: Manage the rippled Server
subcategory: Installation
blurb: Plan system specs and tune configuration for rippled in production environments.
---
# Capacity Planning

This section describes configuration, network, and hardware recommendations that you can use to tune and optimize the performance of your `rippled` server. Being aware of these considerations can help you ensure that your `rippled` server is ready to handle XRP Ledger network capacity today and in the near future.
Expand Down Expand Up @@ -181,7 +189,7 @@ Any enterprise or carrier-class data center should have substantial network band

During exceptionally high periods of transaction volume, some operators have reported that their `rippled` servers have completely saturated a 100MBit/s network link. Therefore, a gigabit network interface is required for reliable performance.

Here are examples of observed network bandwidth use for common `rippled` tasks:
Here are examples of observed uncompressed network bandwidth use for common `rippled` tasks:

| Task | Transmit/Receive |
|:------------------------------------------------|:---------------------------|
Expand All @@ -190,6 +198,9 @@ Here are examples of observed network bandwidth use for common `rippled` tasks:
| Serve historical ledger and transaction reports | 100Mbps transmit |
| Start up `rippled` | 20Mbps receive |

You can save bandwidth by [enabling compression on peer-to-peer communications](enable-link-compression.html), at a cost of higher CPU. Many hardware configurations have spare CPU capacity during normal use, so this can be an economical option if your network bandwidth is limited.


## See Also

- **Concepts:**
Expand Down
12 changes: 6 additions & 6 deletions dactyl-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2248,12 +2248,6 @@ pages:
- ja

- md: tutorials/manage-the-rippled-server/installation/capacity-planning.md
html: capacity-planning.html
funnel: Docs
doc_type: Tutorials
category: Manage the rippled Server
subcategory: Installation
blurb: Plan system specs and tune configuration for rippled in production environments.
targets:
- en

Expand Down Expand Up @@ -2568,6 +2562,12 @@ pages:
targets:
- ja

# TODO: translate this page including the blurb in its frontmatter.
- md: tutorials/manage-the-rippled-server/configure-peering/enable-link-compression.md
targets:
- en
- ja

- md: tutorials/manage-the-rippled-server/configure-peering/forward-ports-for-peering.md
html: forward-ports-for-peering.html
funnel: Docs
Expand Down