{"id":35646,"date":"2024-11-10T10:01:08","date_gmt":"2024-11-10T09:01:08","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=35646"},"modified":"2024-11-10T10:01:08","modified_gmt":"2024-11-10T09:01:08","slug":"postgresql-maybe-we-should-give-zfs-a-chance-1-baseline","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/postgresql-maybe-we-should-give-zfs-a-chance-1-baseline\/","title":{"rendered":"PostgreSQL: Maybe we should give ZFS a chance (1) &#8211; baseline"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Recently I&#8217;ve switched my PostgreSQL playground from Linux to <a href=\"https:\/\/www.freebsd.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">FreeBSD<\/a>. Not because I don&#8217;t like Linux anymore, just because I like trying out other operating systems and see what works the same and what is different. When you install FreeBSD and stick to the defaults, you&#8217;ll get a <a href=\"https:\/\/openzfs.org\/wiki\/Main_Page\" target=\"_blank\" rel=\"noreferrer noopener\">ZFS<\/a> root filesystem and usually I don&#8217;t create separate partitions\/mounts in my playgrounds for PostgreSQL so it went there as well. While playing a bit I got the impression that the whole system was faster than my previous Linux playground so I though it would be good to do some tests on Linux to compare the performance of <a href=\"https:\/\/en.wikipedia.org\/wiki\/Ext4\" target=\"_blank\" rel=\"noreferrer noopener\">ext4<\/a> (which is the default on <a href=\"https:\/\/www.debian.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">Debian<\/a>) and ZFS. So here we go.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I&#8217;ve used a <a href=\"https:\/\/aws.amazon.com\/ec2\/instance-types\/t3\/\" target=\"_blank\" rel=\"noreferrer noopener\">t3.medium<\/a> instance and two 20GB <a href=\"https:\/\/aws.amazon.com\/ebs\/general-purpose\/\" target=\"_blank\" rel=\"noreferrer noopener\">gp3<\/a> disks for the tests, one of them using an ext4 filesystem and the other one for ZFS. The version of <a href=\"https:\/\/www.postgresql.org\/about\/news\/postgresql-17-released-2936\/\" target=\"_blank\" rel=\"noreferrer noopener\">PostgreSQL is 17<\/a>, the operating system is <a href=\"https:\/\/www.debian.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">Debian 12<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As ZFS is not available by default in the Debian repositories (I am not going into the licensing stuff), there are some extra steps to follow which are described in the <a href=\"https:\/\/wiki.debian.org\/ZFS\" target=\"_blank\" rel=\"noreferrer noopener\">Debian Wiki<\/a>. Because ZFS comes as a kernel module, the kernel sources need to be available before it can be installed. For the <a href=\"https:\/\/docs.aws.amazon.com\/AWSEC2\/latest\/UserGuide\/AMIs.html\" target=\"_blank\" rel=\"noreferrer noopener\">AWS AMI<\/a> for Debian this is:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1,16]; title: ; notranslate\" title=\"\">\npostgres@ip-10-0-1-159:\/home\/postgres\/ &#x5B;pg17] apt search kernel | grep headers | grep cloud-amd64\n\nWARNING: apt does not have a stable CLI interface. Use with caution in scripts.\n\nlinux-headers-6.1.0-21-cloud-amd64\/stable-security 6.1.90-1 amd64\nlinux-headers-6.1.0-22-cloud-amd64\/stable 6.1.94-1 amd64\nlinux-headers-6.1.0-23-cloud-amd64\/stable-security 6.1.99-1 amd64\nlinux-headers-6.1.0-25-cloud-amd64\/stable 6.1.106-3 amd64\nlinux-headers-6.1.0-26-cloud-amd64\/stable-security 6.1.112-1 amd64\nlinux-headers-6.10.11+bpo-cloud-amd64\/stable-backports 6.10.11-1~bpo12+1 amd64\nlinux-headers-6.10.6+bpo-cloud-amd64\/stable-backports 6.10.6-1~bpo12+1 amd64\nlinux-headers-6.9.10+bpo-cloud-amd64\/stable-backports 6.9.10-1~bpo12+1 amd64\nlinux-headers-6.9.7+bpo-cloud-amd64\/stable-backports 6.9.7-1~bpo12+1 amd64\nlinux-headers-cloud-amd64\/stable-security 6.1.112-1 amd64\n\npostgres@ip-10-0-1-159:\/home\/postgres\/ &#x5B;pg17] sudo apt install -y linux-headers-cloud-amd64\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Once that is ready, the backports repository needs to be added and then ZFS can be installed:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1,4,5]; title: ; notranslate\" title=\"\">\npostgres@ip-10-0-1-159:\/home\/postgres\/ &#x5B;pg17] cat \/etc\/apt\/sources.list\n# See \/etc\/apt\/sources.list.d\/debian.sources\ndeb http:\/\/deb.debian.org\/debian bookworm-backports main contrib non-free\npostgres@ip-10-0-1-159:\/home\/postgres\/ &#x5B;pg17] sudo apt update\npostgres@ip-10-0-1-159:\/home\/postgres\/ &#x5B;pg17] sudo apt install -t stable-backports zfsutils-linux -y\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">There will be a warning about the license incompatibilities, but as mentioned above I am not going into that topic:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"972\" height=\"338\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot_20241108_081941.png\" alt=\"\" class=\"wp-image-35651\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot_20241108_081941.png 972w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot_20241108_081941-300x104.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot_20241108_081941-768x267.png 768w\" sizes=\"auto, (max-width: 972px) 100vw, 972px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The installation will take some time as the kernel modules will get build. Once it is done, the modules are available and can be loaded (happens automatically after a reboot):<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [20,21]; title: ; notranslate\" title=\"\">\n...\nDone.\n\nzfs.ko:\nRunning module version sanity check.\n - Original module\n   - No original module exists within this kernel\n - Installation\n   - Installing to \/lib\/modules\/6.1.0-26-cloud-amd64\/updates\/dkms\/\n\nspl.ko:\nRunning module version sanity check.\n - Original module\n   - No original module exists within this kernel\n - Installation\n   - Installing to \/lib\/modules\/6.1.0-26-cloud-amd64\/updates\/dkms\/\ndepmod...\nBuilding initial module for 6.10.11+bpo-cloud-amd64\n...\npostgres@ip-10-0-1-159:\/home\/postgres\/ &#x5B;pg17] sudo modprobe zfs\npostgres@ip-10-0-1-159:\/home\/postgres\/ &#x5B;pg17] sudo lsmod | grep zfs\nzfs                  5771264  0\nspl                   135168  1 zfs\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">As I&#8217;ve mentioned earlier, there are two disks I am going to use here:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1]; title: ; notranslate\" title=\"\">\npostgres@ip-10-0-1-159:\/home\/postgres\/ &#x5B;pg17] lsblk | grep 20\nnvme1n1      259:0    0   20G  0 disk \nnvme2n1      259:1    0   20G  0 disk \n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">The first one will be used for the ext4 file system:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1,14,15,17,18,19]; title: ; notranslate\" title=\"\">\npostgres@ip-10-0-1-159:\/home\/postgres\/ &#x5B;pg17] sudo mkfs.ext4 \/dev\/nvme1n1\nmke2fs 1.47.0 (5-Feb-2023)\nCreating filesystem with 5242880 4k blocks and 1310720 inodes\nFilesystem UUID: 8fb9e2b2-9b47-4963-8a2b-a6728a9bb16a\nSuperblock backups stored on blocks: \n        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, \n        4096000\n\nAllocating group tables: done                            \nWriting inode tables: done                            \nCreating journal (32768 blocks): done\nWriting superblocks and filesystem accounting information: done   \n\npostgres@ip-10-0-1-159:\/home\/postgres\/ &#x5B;pg17] mkdir -p \/u02\/pgdata\/ext4\npostgres@ip-10-0-1-159:\/home\/postgres\/ &#x5B;pg17] cat \/etc\/fstab | grep pgdata\n\/dev\/nvme1n1 \/u02\/pgdata\/ext4 ext4 noatime 0 0\npostgres@ip-10-0-1-159:\/home\/postgres\/ &#x5B;pg17] sudo mount -a\npostgres@ip-10-0-1-159:\/home\/postgres\/ &#x5B;pg17] sudo chown postgres:postgres \/u02\/pgdata\/ext4\npostgres@ip-10-0-1-159:\/home\/postgres\/ &#x5B;pg17] df -h | grep pgdata\n\/dev\/nvme1n1      20G   24K   19G   1% \/u02\/pgdata\/ext4\n\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">The second disk is for the ZFS file system:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1,2,5,6,7,8,10]; title: ; notranslate\" title=\"\">\npostgres@ip-10-0-1-159:\/home\/postgres\/ &#x5B;pg17] sudo zpool create pgpool \/dev\/nvme2n1\npostgres@ip-10-0-1-159:\/home\/postgres\/ &#x5B;pg17] sudo zpool list\nNAME     SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT\npgpool  19.5G   130K  19.5G        -         -     0%     0%  1.00x    ONLINE  -\npostgres@ip-10-0-1-159:\/home\/postgres\/ &#x5B;pg17] sudo zfs create pgpool\/pgzfs\npostgres@ip-10-0-1-159:\/home\/postgres\/ &#x5B;pg17] sudo zfs set mountpoint=\/u02\/pgdata\/zfs pgpool\/pgzfs\npostgres@ip-10-0-1-159:\/home\/postgres\/ &#x5B;pg17] sudo zfs set compression=zstd pgpool\/pgzfs\npostgres@ip-10-0-1-159:\/home\/postgres\/ &#x5B;pg17] df -h | grep zfs\npgpool\/pgzfs      19G  128K   19G   1% \/u02\/pgdata\/zfs\npostgres@ip-10-0-1-159:\/home\/postgres\/ &#x5B;pg17] sudo chown postgres:postgres \/u02\/pgdata\/zfs\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">As you can see above I&#8217;ve enabled compression using <a href=\"https:\/\/en.wikipedia.org\/wiki\/Zstd\" target=\"_blank\" rel=\"noreferrer noopener\">zstd<\/a> (<a href=\"https:\/\/en.wikipedia.org\/wiki\/LZ4_(compression_algorithm)\" target=\"_blank\" rel=\"noreferrer noopener\">lz4<\/a> is another option, as well as <a href=\"https:\/\/openzfs.github.io\/openzfs-docs\/man\/master\/7\/zfsprops.7.html\" target=\"_blank\" rel=\"noreferrer noopener\">others<\/a>).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For the ext4 filesystem I&#8217;ll initialize PostgreSQL as we do it usually, which means enabling data checksums (this will anyway be the default starting with PostgreSQL 18):<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1]; title: ; notranslate\" title=\"\">\nostgres@ip-10-0-1-159:\/home\/postgres\/ &#x5B;pg17] initdb --pgdata=\/u02\/pgdata\/ext4\/pg --data-checksums\nThe files belonging to this database system will be owned by user &quot;postgres&quot;.\nThis user must also own the server process.\n\nThe database cluster will be initialized with locale &quot;C.UTF-8&quot;.\nThe default database encoding has accordingly been set to &quot;UTF8&quot;.\nThe default text search configuration will be set to &quot;english&quot;.\n\nData page checksums are enabled.\n\ncreating directory \/u02\/pgdata\/ext4\/pg ... ok\ncreating subdirectories ... ok\nselecting dynamic shared memory implementation ... posix\nselecting default &quot;max_connections&quot; ... 100\nselecting default &quot;shared_buffers&quot; ... 128MB\nselecting default time zone ... Etc\/UTC\ncreating configuration files ... ok\nrunning bootstrap script ... ok\nperforming post-bootstrap initialization ... ok\nsyncing data to disk ... ok\n\ninitdb: warning: enabling &quot;trust&quot; authentication for local connections\ninitdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.\n\nSuccess. You can now start the database server using:\n\n    pg_ctl -D \/u02\/pgdata\/ext4\/pg -l logfile start\n\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">For the ZFS filestem we don&#8217;t need this, as ZFS is doing this anyway:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1]; title: ; notranslate\" title=\"\">\npostgres@ip-10-0-1-159:\/home\/postgres\/ &#x5B;pg17] initdb --pgdata=\/u02\/pgdata\/zfs\/pg\nThe files belonging to this database system will be owned by user &quot;postgres&quot;.\nThis user must also own the server process.\n\nThe database cluster will be initialized with locale &quot;C.UTF-8&quot;.\nThe default database encoding has accordingly been set to &quot;UTF8&quot;.\nThe default text search configuration will be set to &quot;english&quot;.\n\nData page checksums are disabled.\n\ncreating directory \/u02\/pgdata\/zfs\/pg \u2026 ok\ncreating subdirectories \u2026 ok\nselecting dynamic shared memory implementation \u2026 posix\nselecting default &quot;max_connections&quot; \u2026 100\nselecting default &quot;shared_buffers&quot; \u2026 128MB\nselecting default time zone \u2026 Etc\/UTC\ncreating configuration files \u2026 ok\nrunning bootstrap script \u2026 ok\nperforming post-bootstrap initialization \u2026 ok\nsyncing data to disk \u2026 ok\n\ninitdb: warning: enabling &quot;trust&quot; authentication for local connections\ninitdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.\n\nSuccess. You can now start the database server using:\n\n    pg_ctl -D \/u02\/pgdata\/zfs\/pg -l logfile start\n\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">The only other two bits I&#8217;ll change for the ZFS instance, is to turn off <a href=\"https:\/\/www.postgresql.org\/docs\/current\/runtime-config-wal.html#GUC-FULL-PAGE-WRITES\" target=\"_blank\" rel=\"noreferrer noopener\">full_page_writes<\/a> as torn writes do not happen on ZFS and to turn off <a href=\"https:\/\/www.postgresql.org\/docs\/current\/runtime-config-wal.html#GUC-WAL-INIT-ZERO\" target=\"_blank\" rel=\"noreferrer noopener\">wal_init_zero<\/a> which is also not required on ZFS (and of course another port):<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1,2,3]; title: ; notranslate\" title=\"\">\npostgres@ip-10-0-1-159:\/home\/postgres\/ &#x5B;pg17] echo &quot;wal_init_zero=&#039;off&#039;&quot; &gt;&gt; \/u02\/pgdata\/zfs\/pg\/postgresql.auto.conf\npostgres@ip-10-0-1-159:\/home\/postgres\/ &#x5B;pg17] echo &quot;full_page_writes=&#039;off&#039;&quot; &gt;&gt; \/u02\/pgdata\/zfs\/pg\/postgresql.auto.conf\npostgres@ip-10-0-1-159:\/home\/postgres\/ &#x5B;pg17] echo &quot;port=5433&#039;&quot; &gt;&gt; \/u02\/pgdata\/zfs\/pg\/postgresql.auto.conf\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Ready to start both clusters:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1,4]; title: ; notranslate\" title=\"\">\npostgres@ip-10-0-1-159:\/home\/postgres\/ &#x5B;pg17] pg_ctl --pgdata=\/u02\/pgdata\/ext4\/pg\/ --log=\/u02\/pgdata\/ext4\/pg\/log.log start\nwaiting for server to start.... done\nserver started\npostgres@ip-10-0-1-159:\/home\/postgres\/ &#x5B;pg17] pg_ctl --pgdata=\/u02\/pgdata\/zfs\/pg\/ --log=\/u02\/pgdata\/zfs\/pg\/log.log start\nwaiting for server to start.... done\nserver started\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">No we&#8217;re ready to start with the tests, and this is the topic for the next post.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently I&#8217;ve switched my PostgreSQL playground from Linux to FreeBSD. Not because I don&#8217;t like Linux anymore, just because I like trying out other operating systems and see what works the same and what is different. When you install FreeBSD and stick to the defaults, you&#8217;ll get a ZFS root filesystem and usually I don&#8217;t&hellip;&nbsp;<\/p>\n","protected":false},"author":28,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","neve_meta_reading_time":"","_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[4133],"tags":[],"class_list":["post-35646","post","type-post","status-publish","format-standard","category-database"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.9 (Yoast SEO v28.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>PostgreSQL: Maybe we should give ZFS a chance (1) - baseline - dbi services Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/postgresql-maybe-we-should-give-zfs-a-chance-1-baseline\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PostgreSQL: Maybe we should give ZFS a chance (1) - baseline\" \/>\n<meta property=\"og:description\" content=\"Recently I&#8217;ve switched my PostgreSQL playground from Linux to FreeBSD. Not because I don&#8217;t like Linux anymore, just because I like trying out other operating systems and see what works the same and what is different. When you install FreeBSD and stick to the defaults, you&#8217;ll get a ZFS root filesystem and usually I don&#8217;t&hellip;&nbsp;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/postgresql-maybe-we-should-give-zfs-a-chance-1-baseline\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi services Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/dbiservices\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-10T09:01:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot_20241108_081941.png\" \/>\n\t<meta property=\"og:image:width\" content=\"972\" \/>\n\t<meta property=\"og:image:height\" content=\"338\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Open source Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:site\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Open source Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-maybe-we-should-give-zfs-a-chance-1-baseline\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-maybe-we-should-give-zfs-a-chance-1-baseline\\\/\"},\"author\":{\"name\":\"Open source Team\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/0b4548362cac3eeff8b3eaf329e3530a\"},\"headline\":\"PostgreSQL: Maybe we should give ZFS a chance (1) &#8211; baseline\",\"datePublished\":\"2024-11-10T09:01:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-maybe-we-should-give-zfs-a-chance-1-baseline\\\/\"},\"wordCount\":464,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-maybe-we-should-give-zfs-a-chance-1-baseline\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/Screenshot_20241108_081941.png\",\"articleSection\":[\"Database\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-maybe-we-should-give-zfs-a-chance-1-baseline\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-maybe-we-should-give-zfs-a-chance-1-baseline\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-maybe-we-should-give-zfs-a-chance-1-baseline\\\/\",\"name\":\"PostgreSQL: Maybe we should give ZFS a chance (1) - baseline - dbi services Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-maybe-we-should-give-zfs-a-chance-1-baseline\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-maybe-we-should-give-zfs-a-chance-1-baseline\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/Screenshot_20241108_081941.png\",\"datePublished\":\"2024-11-10T09:01:08+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-maybe-we-should-give-zfs-a-chance-1-baseline\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-maybe-we-should-give-zfs-a-chance-1-baseline\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-maybe-we-should-give-zfs-a-chance-1-baseline\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/Screenshot_20241108_081941.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/Screenshot_20241108_081941.png\",\"width\":972,\"height\":338},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/postgresql-maybe-we-should-give-zfs-a-chance-1-baseline\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PostgreSQL: Maybe we should give ZFS a chance (1) &#8211; baseline\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi services Blog\",\"description\":\"#BeSharing\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\",\"name\":\"dbi services\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"width\":512,\"height\":512,\"caption\":\"dbi services\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/dbiservices\\\/\",\"https:\\\/\\\/x.com\\\/dbiservices\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/dbi-services\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/dbiservices\"],\"description\":\"Swiss IT consulting and services company specialized in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.\",\"email\":\"info@dbi-services.com\",\"telephone\":\"+41 32 422 96 00\",\"legalName\":\"dbi services SA\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/0b4548362cac3eeff8b3eaf329e3530a\",\"name\":\"Open source Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/open-source-author.png\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/open-source-author.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/open-source-author.png\",\"caption\":\"Open source Team\"},\"description\":\"Posts published under the Open source Team account are collective contributions by the dbi services open infrastructure consultants. The practice covers open-source databases and platforms, PostgreSQL first of all, along with MySQL, MariaDB, and Linux, from architecture, replication, and high availability to performance tuning and operations under service level agreements, and contributes actively to the PostgreSQL community.\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/open-source-team\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"PostgreSQL: Maybe we should give ZFS a chance (1) - baseline - dbi services Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/postgresql-maybe-we-should-give-zfs-a-chance-1-baseline\/","og_locale":"en_US","og_type":"article","og_title":"PostgreSQL: Maybe we should give ZFS a chance (1) - baseline","og_description":"Recently I&#8217;ve switched my PostgreSQL playground from Linux to FreeBSD. Not because I don&#8217;t like Linux anymore, just because I like trying out other operating systems and see what works the same and what is different. When you install FreeBSD and stick to the defaults, you&#8217;ll get a ZFS root filesystem and usually I don&#8217;t&hellip;&nbsp;","og_url":"https:\/\/www.dbi-services.com\/blog\/postgresql-maybe-we-should-give-zfs-a-chance-1-baseline\/","og_site_name":"dbi services Blog","article_publisher":"https:\/\/www.facebook.com\/dbiservices\/","article_published_time":"2024-11-10T09:01:08+00:00","og_image":[{"width":972,"height":338,"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot_20241108_081941.png","type":"image\/png"}],"author":"Open source Team","twitter_card":"summary_large_image","twitter_creator":"@dbiservices","twitter_site":"@dbiservices","twitter_misc":{"Written by":"Open source Team","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-maybe-we-should-give-zfs-a-chance-1-baseline\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-maybe-we-should-give-zfs-a-chance-1-baseline\/"},"author":{"name":"Open source Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/0b4548362cac3eeff8b3eaf329e3530a"},"headline":"PostgreSQL: Maybe we should give ZFS a chance (1) &#8211; baseline","datePublished":"2024-11-10T09:01:08+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-maybe-we-should-give-zfs-a-chance-1-baseline\/"},"wordCount":464,"commentCount":0,"publisher":{"@id":"https:\/\/www.dbi-services.com\/#organization"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-maybe-we-should-give-zfs-a-chance-1-baseline\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot_20241108_081941.png","articleSection":["Database"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/postgresql-maybe-we-should-give-zfs-a-chance-1-baseline\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-maybe-we-should-give-zfs-a-chance-1-baseline\/","url":"https:\/\/www.dbi-services.com\/blog\/postgresql-maybe-we-should-give-zfs-a-chance-1-baseline\/","name":"PostgreSQL: Maybe we should give ZFS a chance (1) - baseline - dbi services Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-maybe-we-should-give-zfs-a-chance-1-baseline\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-maybe-we-should-give-zfs-a-chance-1-baseline\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot_20241108_081941.png","datePublished":"2024-11-10T09:01:08+00:00","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-maybe-we-should-give-zfs-a-chance-1-baseline\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/postgresql-maybe-we-should-give-zfs-a-chance-1-baseline\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-maybe-we-should-give-zfs-a-chance-1-baseline\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot_20241108_081941.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot_20241108_081941.png","width":972,"height":338},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/postgresql-maybe-we-should-give-zfs-a-chance-1-baseline\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"PostgreSQL: Maybe we should give ZFS a chance (1) &#8211; baseline"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi services Blog","description":"#BeSharing","publisher":{"@id":"https:\/\/www.dbi-services.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.dbi-services.com\/#organization","name":"dbi services","url":"https:\/\/www.dbi-services.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","width":512,"height":512,"caption":"dbi services"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/dbiservices\/","https:\/\/x.com\/dbiservices","https:\/\/www.linkedin.com\/company\/dbi-services\/","https:\/\/www.youtube.com\/user\/dbiservices"],"description":"Swiss IT consulting and services company specialized in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.","email":"info@dbi-services.com","telephone":"+41 32 422 96 00","legalName":"dbi services SA"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/0b4548362cac3eeff8b3eaf329e3530a","name":"Open source Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/05\/open-source-author.png","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/05\/open-source-author.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/05\/open-source-author.png","caption":"Open source Team"},"description":"Posts published under the Open source Team account are collective contributions by the dbi services open infrastructure consultants. The practice covers open-source databases and platforms, PostgreSQL first of all, along with MySQL, MariaDB, and Linux, from architecture, replication, and high availability to performance tuning and operations under service level agreements, and contributes actively to the PostgreSQL community.","url":"https:\/\/www.dbi-services.com\/blog\/author\/open-source-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/35646","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=35646"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/35646\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=35646"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=35646"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=35646"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}