From 31a1533dcf514005d388919b90e59ee2b8381f87 Mon Sep 17 00:00:00 2001 From: 0xAN Date: Tue, 3 Sep 2024 23:00:06 +0800 Subject: [PATCH 01/21] Init ZFS readme for a DA --- nodes/zfs.md | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 nodes/zfs.md diff --git a/nodes/zfs.md b/nodes/zfs.md new file mode 100644 index 00000000000..a850efc3a64 --- /dev/null +++ b/nodes/zfs.md @@ -0,0 +1,78 @@ +--- +description: Learn how to setup your DA node to use on-fly compression with ZFS. +--- + +# Setting up your DA node to use ZFS + +Enabling ZFS compression on a DA Node server can significantly optimize storage efficiency by compressing data on the fly. Follow this step-by-step guide to implement ZFS compression without requiring any additional tuning on the DA node. + +:::tip NOTE +ZFS, compression `zstd-3`: +``` +$ zfs get compressratio celestia && du -h /celestia/bridge/.celestia-bridge +NAME PROPERTY VALUE SOURCE +celestia compressratio 2.05x - +2.6T /celestia/bridge/.celestia-bridge +``` +EXT4, no compression: +``` +$ du -h ~/.celestia-bridge/ +5.0T /home/ubuntu/.celestia-bridge/ +``` +::: + +## Requirements: +1. Bare Metal server with decent amount of RAM (64GB+) +2. At least one empty disk + +## Guide: + +Get your disk name: +```sh +lsblk --nodeps -o name +``` + +Set variables: +```sh +ZFS_POOL_NAME="celestia" && ZFS_DATASET_NAME="bridge" +``` + +Install ZFS utils: +```sh +sudo apt update && sudo apt install zfsutils-linux +``` + +Create ZFS pool: +```sh +zpool create $ZFS_POOL_NAME /dev/nvme0n1 +``` + +:::tip NOTE +If you have more than one disk available - you can add them also: +```sh +zpool create $ZFS_POOL_NAME /dev/nvme0n1 /dev/nvme1n1 +``` +::: + +Create dataset: +```sh +zfs create $ZFS_POOL_NAME/$ZFS_DATASET_NAME +``` + +Enable compression: +```sh +zfs set compression=zstd-3 $ZFS_POOL_NAME/$ZFS_DATASET_NAME +``` + +Set the custom path to the bridge data folder: +```sh +# Add flag --node.store /celestia/bridge/.celestia-bridge to your command, example: +celestia bridge start --metrics.tls=true --metrics --metrics.endpoint otel.celestia.observer --p2p.metrics --node.store /celestia/bridge/.celestia-bridge +``` + +After completing the steps above, you can begin syncing your DA node. It is recommended to sync from scratch unless you intend to mount your ZFS volume to the default or a custom `data.store`. + +Check your compression rate: +```sh +zfs get compressratio $ZFS_POOL_NAME +``` From ec8d415d14f086428e5761d6edc71a6b18fdb810 Mon Sep 17 00:00:00 2001 From: 0xAN Date: Tue, 3 Sep 2024 23:07:45 +0800 Subject: [PATCH 02/21] Link to the ZFS.md from the bridge-node.md --- nodes/bridge-node.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nodes/bridge-node.md b/nodes/bridge-node.md index 116a09a0a89..88e14d4699b 100644 --- a/nodes/bridge-node.md +++ b/nodes/bridge-node.md @@ -202,3 +202,8 @@ Follow the [tutorial on setting up the bridge node as a background process with SystemD](./systemd.md). You have successfully set up a bridge node that is syncing with the network. + +### Optional: enable on-fly compression with ZFS + +Follow the +[tutorial on how to setup your DA node to use on-fly compression with ZFS](./zfs.md). From a5a9e41629699562d3a2d8e70ac328c0be6e485b Mon Sep 17 00:00:00 2001 From: 0xAN Date: Tue, 3 Sep 2024 23:22:05 +0800 Subject: [PATCH 03/21] upd zfs.md --- nodes/zfs.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/nodes/zfs.md b/nodes/zfs.md index a850efc3a64..ffb8e3a3b96 100644 --- a/nodes/zfs.md +++ b/nodes/zfs.md @@ -4,7 +4,7 @@ description: Learn how to setup your DA node to use on-fly compression with ZFS. # Setting up your DA node to use ZFS -Enabling ZFS compression on a DA Node server can significantly optimize storage efficiency by compressing data on the fly. Follow this step-by-step guide to implement ZFS compression without requiring any additional tuning on the DA node. +Enabling ZFS compression on a DA Node server can significantly optimize storage efficiency by compressing data on the fly. Follow this step-by-step guide to implement ZFS compression without requiring any additional tuning on the DA node. :::tip NOTE ZFS, compression `zstd-3`: @@ -23,7 +23,7 @@ $ du -h ~/.celestia-bridge/ ## Requirements: 1. Bare Metal server with decent amount of RAM (64GB+) -2. At least one empty disk +2. At least one empty disk (with no filesystem) ## Guide: @@ -70,7 +70,11 @@ Set the custom path to the bridge data folder: celestia bridge start --metrics.tls=true --metrics --metrics.endpoint otel.celestia.observer --p2p.metrics --node.store /celestia/bridge/.celestia-bridge ``` -After completing the steps above, you can begin syncing your DA node. It is recommended to sync from scratch unless you intend to mount your ZFS volume to the default or a custom `data.store`. +:::tip NOTE +It is recommended to sync from scratch. In case of using a snapshot it is important to have your local route to `--data.store` identical to one in a snapshot. +::: + +After completing the steps above, you can begin syncing your DA node. Check your compression rate: ```sh From a55477f6b9c3a1f311f6780f10cec9ca5f701206 Mon Sep 17 00:00:00 2001 From: 0xAN Date: Tue, 3 Sep 2024 23:24:15 +0800 Subject: [PATCH 04/21] upd zfs.md --- nodes/zfs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodes/zfs.md b/nodes/zfs.md index ffb8e3a3b96..9d4493a834b 100644 --- a/nodes/zfs.md +++ b/nodes/zfs.md @@ -76,7 +76,7 @@ It is recommended to sync from scratch. In case of using a snapshot it is import After completing the steps above, you can begin syncing your DA node. -Check your compression rate: +You can check your compression rate with the following command: ```sh zfs get compressratio $ZFS_POOL_NAME ``` From 9c2fb73e883a8710626e20548081cf55f90f4388 Mon Sep 17 00:00:00 2001 From: 0xAN Date: Tue, 3 Sep 2024 23:38:07 +0800 Subject: [PATCH 05/21] ZFS: bridge start command for different networks --- nodes/zfs.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/nodes/zfs.md b/nodes/zfs.md index 9d4493a834b..2b3e5d976e4 100644 --- a/nodes/zfs.md +++ b/nodes/zfs.md @@ -65,11 +65,26 @@ zfs set compression=zstd-3 $ZFS_POOL_NAME/$ZFS_DATASET_NAME ``` Set the custom path to the bridge data folder: -```sh + +::: code-group + +```sh [Mainnet Beta] # Add flag --node.store /celestia/bridge/.celestia-bridge to your command, example: celestia bridge start --metrics.tls=true --metrics --metrics.endpoint otel.celestia.observer --p2p.metrics --node.store /celestia/bridge/.celestia-bridge ``` +```sh [Mocha] +# Add flag --node.store /celestia/bridge/.celestia-bridge-mocha-4 to your command, example: +celestia bridge start --metrics.tls=true --metrics --metrics.endpoint otel.celestia-mocha.com --p2p.metrics --node.store /celestia/bridge/.celestia-bridge-mocha-4 --p2p.network mocha +``` + +```sh [Arabica] +# Add flag --node.store /celestia/bridge/.celestia-bridge-arabica-11 to your command, example: +celestia bridge start --node.store /celestia/bridge/.celestia-bridge-arabica-11 --p2p.network arabica +``` + +::: + :::tip NOTE It is recommended to sync from scratch. In case of using a snapshot it is important to have your local route to `--data.store` identical to one in a snapshot. ::: From eb9a83d0d65a457d6e977cf556ed1946e631d941 Mon Sep 17 00:00:00 2001 From: 0xAN Date: Tue, 3 Sep 2024 23:43:12 +0800 Subject: [PATCH 06/21] Update bridge-node.md --- nodes/bridge-node.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodes/bridge-node.md b/nodes/bridge-node.md index 88e14d4699b..22115cd1bda 100644 --- a/nodes/bridge-node.md +++ b/nodes/bridge-node.md @@ -206,4 +206,4 @@ You have successfully set up a bridge node that is syncing with the network. ### Optional: enable on-fly compression with ZFS Follow the -[tutorial on how to setup your DA node to use on-fly compression with ZFS](./zfs.md). +[tutorial on how to set up your DA node to use on-fly compression with ZFS](./zfs.md). From baead03109e63825a544a0cb0d249cb1068bb49b Mon Sep 17 00:00:00 2001 From: 0xAN Date: Wed, 11 Sep 2024 03:43:47 +0800 Subject: [PATCH 07/21] [ZFS] add modern CPU to the requirements --- nodes/zfs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodes/zfs.md b/nodes/zfs.md index 2b3e5d976e4..af381be71f1 100644 --- a/nodes/zfs.md +++ b/nodes/zfs.md @@ -22,7 +22,7 @@ $ du -h ~/.celestia-bridge/ ::: ## Requirements: -1. Bare Metal server with decent amount of RAM (64GB+) +1. A bare metal server with a substantial amount of RAM (64GB or more) and a modern CPU (latest generation EPYC or Xeon with a clock speed of 2.1GHz or higher is recommended) 2. At least one empty disk (with no filesystem) ## Guide: From 804a79e33a5f0fc70e4b57c294972850ca1825f7 Mon Sep 17 00:00:00 2001 From: 0xAN Date: Wed, 11 Sep 2024 03:45:02 +0800 Subject: [PATCH 08/21] [ZFS] threads --- nodes/zfs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodes/zfs.md b/nodes/zfs.md index af381be71f1..6ed773762c2 100644 --- a/nodes/zfs.md +++ b/nodes/zfs.md @@ -22,7 +22,7 @@ $ du -h ~/.celestia-bridge/ ::: ## Requirements: -1. A bare metal server with a substantial amount of RAM (64GB or more) and a modern CPU (latest generation EPYC or Xeon with a clock speed of 2.1GHz or higher is recommended) +1. A bare metal server with a substantial amount of RAM (64GB or more) and a modern CPU (latest generation EPYC or Xeon with a clock speed of 2.1GHz or higher and 32 threads or higher is recommended) 2. At least one empty disk (with no filesystem) ## Guide: From d3385816af2ae3a2ad8c5000f3a450d1868df48c Mon Sep 17 00:00:00 2001 From: 0xAN Date: Sun, 13 Oct 2024 01:45:43 +0800 Subject: [PATCH 09/21] [ZFS] fine-tunning --- nodes/zfs.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/nodes/zfs.md b/nodes/zfs.md index 6ed773762c2..fb9bf064c18 100644 --- a/nodes/zfs.md +++ b/nodes/zfs.md @@ -95,3 +95,35 @@ You can check your compression rate with the following command: ```sh zfs get compressratio $ZFS_POOL_NAME ``` + +## ZFS Fine-Tuning (Advanced) +If you want to increase your I/O performance and sync speed, you can try the following steps: +### Disable Auto-Trim +Auto-trim disabling can improve I/O performance, but may lead to increased SSD wear over time. +```sh +sudo zpool set autotrim=off $ZFS_POOL_NAME +``` + +:::tip NOTE +You always can trim maually: `sudo zpool trim $ZFS_POOL_NAME` +::: + +### Disable sync +Disabling boosts write speed, but risks data loss if the system crashes before data is written to disk. +```sh +sudo zfs set sync=disabled $ZFS_POOL_NAME +``` + +:::tip NOTE +You should not keep the `sync` feature disabled permanently; it is useful during the initial DA node sync but can be re-enabled afterward. You can enable `sync` again with: `sudo zfs set sync=enabled $ZFS_POOL_NAME`. +::: + +### Disable prefetch +Disabling reduces memory usage but can slow down performance for sequential read workloads. +```sh +echo 1 | sudo tee /sys/module/zfs/parameters/zfs_prefetch_disable +``` + +:::tip NOTE +You can always re-enable it: `echo 0 | sudo tee /sys/module/zfs/parameters/zfs_prefetch_disable` +::: From 36cc78fe281fe22fb06b6291afe1019556bba24d Mon Sep 17 00:00:00 2001 From: 0xAN Date: Sun, 13 Oct 2024 09:07:06 +0800 Subject: [PATCH 10/21] [ZFS] ashift & recordsize --- nodes/zfs.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/nodes/zfs.md b/nodes/zfs.md index fb9bf064c18..db33609d811 100644 --- a/nodes/zfs.md +++ b/nodes/zfs.md @@ -44,13 +44,13 @@ sudo apt update && sudo apt install zfsutils-linux Create ZFS pool: ```sh -zpool create $ZFS_POOL_NAME /dev/nvme0n1 +zpool create -o ashift=12 $ZFS_POOL_NAME /dev/nvme0n1 ``` :::tip NOTE If you have more than one disk available - you can add them also: ```sh -zpool create $ZFS_POOL_NAME /dev/nvme0n1 /dev/nvme1n1 +zpool create -o ashift=12 $ZFS_POOL_NAME /dev/nvme0n1 /dev/nvme1n1 ``` ::: @@ -111,7 +111,7 @@ You always can trim maually: `sudo zpool trim $ZFS_POOL_NAME` ### Disable sync Disabling boosts write speed, but risks data loss if the system crashes before data is written to disk. ```sh -sudo zfs set sync=disabled $ZFS_POOL_NAME +zfs set sync=disabled $ZFS_POOL_NAME ``` :::tip NOTE @@ -127,3 +127,9 @@ echo 1 | sudo tee /sys/module/zfs/parameters/zfs_prefetch_disable :::tip NOTE You can always re-enable it: `echo 0 | sudo tee /sys/module/zfs/parameters/zfs_prefetch_disable` ::: + +### Set record size +Setting `recordsize=256K` defines the maximum block size that ZFS will use when writing data to a dataset. +```sh +zfs set recordsize=256K $ZFS_POOL_NAME/$ZFS_DATASET_NAME +``` From 65de6dd281ac79f49f431d7102a87643f06ded55 Mon Sep 17 00:00:00 2001 From: Josh Stein <46639943+jcstein@users.noreply.github.com> Date: Tue, 21 Jan 2025 09:56:28 -0500 Subject: [PATCH 11/21] Apply suggestions from code review --- how-to-guides/bridge-node.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/how-to-guides/bridge-node.md b/how-to-guides/bridge-node.md index 1ae7b0739da..60c16728635 100644 --- a/how-to-guides/bridge-node.md +++ b/how-to-guides/bridge-node.md @@ -206,4 +206,4 @@ You have successfully set up a bridge node that is syncing with the network. ### Optional: enable on-fly compression with ZFS Follow the -[tutorial on how to set up your DA node to use on-fly compression with ZFS](./zfs.md). +[tutorial on how to set up your DA node to use on-fly compression with ZFS](/how-to-guides/zfs.md). From 6e31a4d422e84a7d0234c5321c6bf11e06e30466 Mon Sep 17 00:00:00 2001 From: 0xAN Date: Tue, 21 Jan 2025 22:59:30 +0800 Subject: [PATCH 12/21] new metrics endpoint for the mocha network --- how-to-guides/zfs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/how-to-guides/zfs.md b/how-to-guides/zfs.md index db33609d811..2a7f54c4d7a 100644 --- a/how-to-guides/zfs.md +++ b/how-to-guides/zfs.md @@ -75,7 +75,7 @@ celestia bridge start --metrics.tls=true --metrics --metrics.endpoint otel.celes ```sh [Mocha] # Add flag --node.store /celestia/bridge/.celestia-bridge-mocha-4 to your command, example: -celestia bridge start --metrics.tls=true --metrics --metrics.endpoint otel.celestia-mocha.com --p2p.metrics --node.store /celestia/bridge/.celestia-bridge-mocha-4 --p2p.network mocha +celestia bridge start --metrics.tls=true --metrics --metrics.endpoint otel.mocha.celestia.observer --p2p.metrics --node.store /celestia/bridge/.celestia-bridge-mocha-4 --p2p.network mocha ``` ```sh [Arabica] From 53fa8b7b68d4ec8e143c1e94c452257775665322 Mon Sep 17 00:00:00 2001 From: 0xAN Date: Tue, 21 Jan 2025 23:08:08 +0800 Subject: [PATCH 13/21] Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- how-to-guides/zfs.md | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/how-to-guides/zfs.md b/how-to-guides/zfs.md index 2a7f54c4d7a..2c1256fb470 100644 --- a/how-to-guides/zfs.md +++ b/how-to-guides/zfs.md @@ -4,25 +4,24 @@ description: Learn how to setup your DA node to use on-fly compression with ZFS. # Setting up your DA node to use ZFS +# Setting up your DA node to use ZFS + +:::warning +Using ZFS compression may impact node performance depending on your hardware configuration. Ensure your system meets the recommended requirements before proceeding. This is an optional optimization that may not be suitable for all deployments. +::: + Enabling ZFS compression on a DA Node server can significantly optimize storage efficiency by compressing data on the fly. Follow this step-by-step guide to implement ZFS compression without requiring any additional tuning on the DA node. :::tip NOTE ZFS, compression `zstd-3`: -``` -$ zfs get compressratio celestia && du -h /celestia/bridge/.celestia-bridge -NAME PROPERTY VALUE SOURCE -celestia compressratio 2.05x - -2.6T /celestia/bridge/.celestia-bridge -``` -EXT4, no compression: -``` -$ du -h ~/.celestia-bridge/ -5.0T /home/ubuntu/.celestia-bridge/ -``` -::: ## Requirements: -1. A bare metal server with a substantial amount of RAM (64GB or more) and a modern CPU (latest generation EPYC or Xeon with a clock speed of 2.1GHz or higher and 32 threads or higher is recommended) +1. A bare metal server with: + - RAM: 64GB or more + - CPU: Latest generation EPYC or Xeon with: + - Clock speed: 2.1GHz or higher + - Threads: 32 or higher + - Note: Additional CPU overhead is required for ZFS compression 2. At least one empty disk (with no filesystem) ## Guide: @@ -97,6 +96,9 @@ zfs get compressratio $ZFS_POOL_NAME ``` ## ZFS Fine-Tuning (Advanced) +:::danger +The following settings can significantly impact data integrity and system stability. Only proceed if you fully understand the implications of each setting. These optimizations should be carefully tested in a non-production environment first. +::: If you want to increase your I/O performance and sync speed, you can try the following steps: ### Disable Auto-Trim Auto-trim disabling can improve I/O performance, but may lead to increased SSD wear over time. @@ -109,15 +111,16 @@ You always can trim maually: `sudo zpool trim $ZFS_POOL_NAME` ::: ### Disable sync -Disabling boosts write speed, but risks data loss if the system crashes before data is written to disk. -```sh -zfs set sync=disabled $ZFS_POOL_NAME -``` +:::danger +Disabling sync provides faster write speeds but significantly increases the risk of data corruption in case of system crashes or power failures. Data in memory may be permanently lost before being written to disk. -:::tip NOTE -You should not keep the `sync` feature disabled permanently; it is useful during the initial DA node sync but can be re-enabled afterward. You can enable `sync` again with: `sudo zfs set sync=enabled $ZFS_POOL_NAME`. +This setting should: +1. Only be used during initial node sync +2. Never be used in production environments +3. Be re-enabled immediately after initial sync completes ::: + ### Disable prefetch Disabling reduces memory usage but can slow down performance for sequential read workloads. ```sh From bfdeb78733bc5e76bdea4c35d0c98a70601f5482 Mon Sep 17 00:00:00 2001 From: 0xAN Date: Tue, 21 Jan 2025 23:11:21 +0800 Subject: [PATCH 14/21] ZFS: add disk (non-empty and unmounted) checks --- how-to-guides/zfs.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/how-to-guides/zfs.md b/how-to-guides/zfs.md index 2c1256fb470..171e080235f 100644 --- a/how-to-guides/zfs.md +++ b/how-to-guides/zfs.md @@ -31,6 +31,16 @@ Get your disk name: lsblk --nodeps -o name ``` +Verify disk is empty (should show no partitions): +```sh +lsblk YOUR_DISK_NAME (/dev/nvme0n1 or /dev/sda i.e.) +``` + +Verify disk is not mounted: +```sh +mount | grep YOUR_DISK_NAME +``` + Set variables: ```sh ZFS_POOL_NAME="celestia" && ZFS_DATASET_NAME="bridge" From 8521279713713fc39241a70f2bcd7b3f45e645dd Mon Sep 17 00:00:00 2001 From: 0xAN Date: Tue, 21 Jan 2025 23:11:41 +0800 Subject: [PATCH 15/21] Update how-to-guides/zfs.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- how-to-guides/zfs.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/how-to-guides/zfs.md b/how-to-guides/zfs.md index 171e080235f..13495ca40c1 100644 --- a/how-to-guides/zfs.md +++ b/how-to-guides/zfs.md @@ -4,8 +4,6 @@ description: Learn how to setup your DA node to use on-fly compression with ZFS. # Setting up your DA node to use ZFS -# Setting up your DA node to use ZFS - :::warning Using ZFS compression may impact node performance depending on your hardware configuration. Ensure your system meets the recommended requirements before proceeding. This is an optional optimization that may not be suitable for all deployments. ::: From 0adb4a8774012478260d96dc1bd943bd3c22eb27 Mon Sep 17 00:00:00 2001 From: 0xAN Date: Tue, 21 Jan 2025 23:14:48 +0800 Subject: [PATCH 16/21] ZFS: add variables check step Very edge case, but just let it be --- how-to-guides/zfs.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/how-to-guides/zfs.md b/how-to-guides/zfs.md index 13495ca40c1..efdfc7bc0c7 100644 --- a/how-to-guides/zfs.md +++ b/how-to-guides/zfs.md @@ -44,6 +44,14 @@ Set variables: ZFS_POOL_NAME="celestia" && ZFS_DATASET_NAME="bridge" ``` +Validate variables are set: +```sh +if [ -z "$ZFS_POOL_NAME" ] || [ -z "$ZFS_DATASET_NAME" ]; then + echo "Error: Variables not set correctly" + exit 1 +fi +``` + Install ZFS utils: ```sh sudo apt update && sudo apt install zfsutils-linux From 15d755f36903846dfc9fc77008d2e692825fd9f0 Mon Sep 17 00:00:00 2001 From: 0xAN Date: Tue, 21 Jan 2025 23:17:57 +0800 Subject: [PATCH 17/21] ZFS: restore comparison note --- how-to-guides/zfs.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/how-to-guides/zfs.md b/how-to-guides/zfs.md index efdfc7bc0c7..6e2471c0089 100644 --- a/how-to-guides/zfs.md +++ b/how-to-guides/zfs.md @@ -12,6 +12,18 @@ Enabling ZFS compression on a DA Node server can significantly optimize storage :::tip NOTE ZFS, compression `zstd-3`: +``` +$ zfs get compressratio celestia && du -h /celestia/bridge/.celestia-bridge +NAME PROPERTY VALUE SOURCE +celestia compressratio 2.05x - +2.6T /celestia/bridge/.celestia-bridge +``` +EXT4, no compression: +``` +$ du -h ~/.celestia-bridge/ +5.0T /home/ubuntu/.celestia-bridge/ +``` +::: ## Requirements: 1. A bare metal server with: From 43c71dce364679ca0953906e4c35a36844b0c26c Mon Sep 17 00:00:00 2001 From: 0xAN Date: Tue, 21 Jan 2025 23:26:32 +0800 Subject: [PATCH 18/21] ZFS: refresh size comparison data /w shwap --- how-to-guides/zfs.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/how-to-guides/zfs.md b/how-to-guides/zfs.md index 6e2471c0089..eb2fce9a8c4 100644 --- a/how-to-guides/zfs.md +++ b/how-to-guides/zfs.md @@ -15,13 +15,13 @@ ZFS, compression `zstd-3`: ``` $ zfs get compressratio celestia && du -h /celestia/bridge/.celestia-bridge NAME PROPERTY VALUE SOURCE -celestia compressratio 2.05x - -2.6T /celestia/bridge/.celestia-bridge +celestia compressratio 1.22x - +1.3T /celestia/bridge/.celestia-bridge ``` EXT4, no compression: ``` $ du -h ~/.celestia-bridge/ -5.0T /home/ubuntu/.celestia-bridge/ +1.8T /home/ubuntu/.celestia-bridge/ ``` ::: From 3a1486caeb1963e9a8224033e144270c191575e6 Mon Sep 17 00:00:00 2001 From: 0xAN Date: Wed, 22 Jan 2025 03:23:46 +0800 Subject: [PATCH 19/21] Update how-to-guides/zfs.md Co-authored-by: Josh Stein <46639943+jcstein@users.noreply.github.com> --- how-to-guides/zfs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/how-to-guides/zfs.md b/how-to-guides/zfs.md index eb2fce9a8c4..022cc109b05 100644 --- a/how-to-guides/zfs.md +++ b/how-to-guides/zfs.md @@ -2,7 +2,7 @@ description: Learn how to setup your DA node to use on-fly compression with ZFS. --- -# Setting up your DA node to use ZFS +# Optional: Setting up your DA node to use ZFS :::warning Using ZFS compression may impact node performance depending on your hardware configuration. Ensure your system meets the recommended requirements before proceeding. This is an optional optimization that may not be suitable for all deployments. From 050e424925922caf82a0a9be6ad27e7cd291a534 Mon Sep 17 00:00:00 2001 From: 0xAN Date: Wed, 22 Jan 2025 05:56:38 +0800 Subject: [PATCH 20/21] ZFS: add pool status and properties commands --- how-to-guides/zfs.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/how-to-guides/zfs.md b/how-to-guides/zfs.md index 022cc109b05..7ca162d7524 100644 --- a/how-to-guides/zfs.md +++ b/how-to-guides/zfs.md @@ -81,6 +81,16 @@ zpool create -o ashift=12 $ZFS_POOL_NAME /dev/nvme0n1 /dev/nvme1n1 ``` ::: +Verify pool status: +```sh +zpool status $ZFS_POOL_NAME +``` + +Verify pool properties: +```sh +zpool get all $ZFS_POOL_NAME +``` + Create dataset: ```sh zfs create $ZFS_POOL_NAME/$ZFS_DATASET_NAME From 6817122ca332db6d852c134259024aacc330b317 Mon Sep 17 00:00:00 2001 From: 0xAN Date: Wed, 22 Jan 2025 06:02:56 +0800 Subject: [PATCH 21/21] ZFS: fix typo Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- how-to-guides/zfs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/how-to-guides/zfs.md b/how-to-guides/zfs.md index 7ca162d7524..38a3014d34d 100644 --- a/how-to-guides/zfs.md +++ b/how-to-guides/zfs.md @@ -145,7 +145,7 @@ sudo zpool set autotrim=off $ZFS_POOL_NAME ``` :::tip NOTE -You always can trim maually: `sudo zpool trim $ZFS_POOL_NAME` +You can always trim manually: `sudo zpool trim $ZFS_POOL_NAME` ::: ### Disable sync