# Heavy ZFS flush activity impacting QuestDB performance?

**URL:** <https://community.questdb.com/t/heavy-zfs-flush-activity-impacting-questdb-performance/812>\
**Category:** Community\
**Tags:** question\
**Created:** [April 17, 2025, 8:48am UTC](https://community.questdb.com/t/heavy-zfs-flush-activity-impacting-questdb-performance/812 "2025-04-17T08:48:58Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aditya\_Rawat](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.questdb.com/aditya_rawat/32/381_2.png) [@Aditya\_Rawat](https://community.questdb.com/u/Aditya_Rawat)\
**Post date:** [April 17, 2025, 8:48am UTC](https://community.questdb.com/t/heavy-zfs-flush-activity-impacting-questdb-performance/812/1 "2025-04-17T08:48:58Z")

</div>

![Screenshot from 2025-04-17 09-57-58](https://canada1.discourse-cdn.com/flex004/uploads/questdb/original/1X/0df63222ac94736ca219e0509068ae89055bb215.jpeg)  
Hi all, I’m running QuestDB on ZFS and noticed extremely high disk write activity (almost ~1 GB/s) from a kernel thread: [flush-zfs-2]. due to whcih my disk util is always 100%.

Is this level of ZFS background flushing expected?

---

<div class="post-metadata">

**Author:** ![puzpuzpuz](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.questdb.com/puzpuzpuz/32/25_2.png) [@puzpuzpuz](https://community.questdb.com/u/puzpuzpuz)\
**Post date:** [April 17, 2025, 11:31am UTC](https://community.questdb.com/t/heavy-zfs-flush-activity-impacting-questdb-performance/812/2 "2025-04-17T11:31:22Z")

</div>

Hi Aditya,

Usually, ZFS doesn’t write unexpectedly high volume of data to disk.

What’s your ingestion scenario? Are you inserting lots of rows? Which client/protocol do you use to insert data? Understanding your load might help us understand what’s going on with ZFS.

---

<div class="post-metadata">

**Author:** ![Aditya\_Rawat](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.questdb.com/aditya_rawat/32/381_2.png) [@Aditya\_Rawat](https://community.questdb.com/u/Aditya_Rawat)\
**Post date:** [April 19, 2025, 12:56pm UTC](https://community.questdb.com/t/heavy-zfs-flush-activity-impacting-questdb-performance/812/3 "2025-04-19T12:56:42Z")

</div>

We are inserting approximately **2 MB of data (~7.5k rows)** every **7 to 25 millis** using **ILP over TCP** , with **18 concurrent connections** writing in parallel to different tables.

We’ve also **disabled ZFS sync** on the dataset (`sync=disabled`), but it hasn’t had any noticeable impact on performance or flushing behavior.

---

<div class="post-metadata">

**Author:** ![puzpuzpuz](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.questdb.com/puzpuzpuz/32/25_2.png) [@puzpuzpuz](https://community.questdb.com/u/puzpuzpuz)\
**Post date:** [April 19, 2025, 6:53pm UTC](https://community.questdb.com/t/heavy-zfs-flush-activity-impacting-questdb-performance/812/4 "2025-04-19T18:53:31Z")

</div>

That’s a relatively high ingestion rate. In our practice, ZFS becomes a bottleneck under high ingestion load. How is important the compression in your case? If it’s not terribly important, you should try ext4 or xfs. And in case if you’re using a network attached disk, like AWS EBS, make sure you have it configured to the maximum possible throughput and IOPS.

---

<div class="post-metadata">

**Author:** ![Aditya\_Rawat](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.questdb.com/aditya_rawat/32/381_2.png) [@Aditya\_Rawat](https://community.questdb.com/u/Aditya_Rawat)\
**Post date:** [April 21, 2025, 9:06am UTC](https://community.questdb.com/t/heavy-zfs-flush-activity-impacting-questdb-performance/812/5 "2025-04-21T09:06:28Z")

</div>

I’m okay with using XFS for real-time ingestion to avoid performance issues, but I plan to migrate the data to a ZFS disk afterward. If compression is enabled on the ZFS dataset, will the data be compressed during migration? Will this setup work reliably — ingesting on XFS, then storing long-term on a separate compressed ZFS disk?

Since the streaming database can stay on XFS for performance, but the historical data needs to go on ZFS due to large storage requirements, what would be the best and most efficient way to handle the migration?

Also, what are the recommended settings for the XFS filesystem in a high-throughput write workload?

Using a 4TB NVME M2 Gen4 Drive (Model : CT4000P3PSSD8).

---

<div class="post-metadata">

**Author:** ![puzpuzpuz](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.questdb.com/puzpuzpuz/32/25_2.png) [@puzpuzpuz](https://community.questdb.com/u/puzpuzpuz)\
**Post date:** [April 22, 2025, 6:51am UTC](https://community.questdb.com/t/heavy-zfs-flush-activity-impacting-questdb-performance/812/6 "2025-04-22T06:51:09Z")

</div>

> [@Aditya\_Rawat](#):
>
> If compression is enabled on the ZFS dataset, will the data be compressed during migration? Will this setup work reliably — ingesting on XFS, then storing long-term on a separate compressed ZFS disk?

With a single database instance this may be tricky as you’d have to detach partitions, copy them to the ZFS volume, and attach them via a sym link:

> **[ALTER TABLE ATTACH PARTITION | QuestDB](https://questdb.com/docs/reference/sql/alter-table-attach-partition/#symbolic-links)**
>
> ATTACH PARTITION SQL keyword reference documentation.

We’re working on native Apache Parquet support which will provide better compression ratio than ZFS. The idea is to support SQL statements for converting the older partitions from/to Apache Parquet format, with enabled encoding and compression. Hard to name an ETA for this feature, but hopefully it’s ready in a few months.

As for special XFS tuning, so far the defaults worked fine for us.

---

<div class="post-metadata">

**Author:** ![nwoolmer](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.questdb.com/nwoolmer/32/24_2.png) [@nwoolmer](https://community.questdb.com/u/nwoolmer)\
**Post date:** [April 22, 2025, 10:01am UTC](https://community.questdb.com/t/heavy-zfs-flush-activity-impacting-questdb-performance/812/7 "2025-04-22T10:01:19Z")

</div>

We do have `IN VOLUME` , but this is for entire tables only, not just some partitions. It also has some bugs when dropping and re-creating tables.

That being said, you could have a separate table on a `zfs` volume with historical data, and then one on `xfs` with real-time data. Then you periodically copy data across in bulk via `INSERT INTO SELECT`, and drop it from your real-time `xfs` table.

Then you can JOIN across both tables.

These are the bugs I know of related to that feature:

 ![image](https://canada1.discourse-cdn.com/flex004/uploads/questdb/original/1X/2b5f19fd5b33d06a14e19079fb8e59fa8b00fa7f.png)

Whether they would be dealbreakers, or worth working around in this case, is up to you!
