{"id":1238,"date":"2026-09-28T02:32:14","date_gmt":"2026-09-28T02:32:14","guid":{"rendered":"https:\/\/virtualserversvps.com\/blog\/?p=1238"},"modified":"2026-09-28T02:32:14","modified_gmt":"2026-09-28T02:32:14","slug":"ext4-journal-commit-interval-durability-tradeoff-vps","status":"publish","type":"post","link":"https:\/\/virtualserversvps.com\/blog\/ext4-journal-commit-interval-durability-tradeoff-vps\/","title":{"rendered":"ext4 Journal Commit Interval on a VPS: The Durability vs Throughput Tradeoff, Measured"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Every ext4 filesystem on your VPS makes a silent promise: after <code>fsync()<\/code> returns, the data is on stable storage. Between those explicit syncs, the kernel batches writes and flushes the journal every five seconds by default. That five-second window is a deliberate compromise between throughput and how much data you lose in a power failure. Most VPS tuning guides tell you to raise it without ever measuring what it costs or what it buys. This article does both.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What the Journal Actually Does<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">ext4 in its default <code>data=ordered<\/code> mode writes metadata changes to the journal and forces data blocks to disk <em>before<\/em> the metadata commit. The journal commit interval (<code>commit=n<\/code>, default 5 seconds) controls how often accumulated metadata transactions are flushed. Two other knobs interact with it:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><code>commit=n<\/code> &#8211; maximum seconds between journal commits (default 5).<\/li><li><code>barrier=1<\/code> &#8211; force write barriers so the device flushes its cache at commit (default on, and you should keep it).<\/li><li><code>data=ordered<\/code> &#8211; ordering guarantee that prevents stale-data-after-crash exposure.<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Crucially, raising <code>commit<\/code> does <strong>not<\/strong> weaken <code>fsync()<\/code>. An application that calls fsync after writing is still durable regardless of the interval. The interval only governs data that has been written but not explicitly synced.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Measuring the Effect on Small-File Write Loads<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The workload where the commit interval matters most is many small synchronous-ish writes without explicit fsync &#8211; think a busy log directory, a mail spool, or a CMS writing session files. Reproduce it with fio using <code>fsync=0<\/code> so the commit interval is the only thing batching.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>fio --name=smallfiles --directory=\/var\/tmp\/t --nrfiles=2000 \\\n  --filesize=8k --rw=write --bs=4k --fsync=0 --direct=0 \\\n  --runtime=60 --time_based --output-format=json --output=\/tmp\/w.json\njq '.jobs[0] | {iops, bw_kb: (.bw\/1024), clat_p99: .clat_ns.percentile[\"99.000000\"]}' \/tmp\/w.json<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Run it once at the default and once after a remount with a longer interval. The difference is entirely batching efficiency.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Mount option<\/th><th>Write IOPS<\/th><th>clat p99<\/th><th>Max data at risk on power loss<\/th><\/tr><\/thead><tbody><tr><td>commit=5 (default)<\/td><td>4,100<\/td><td>11 ms<\/td><td>up to 5 s of unsynced writes<\/td><\/tr><tr><td>commit=30<\/td><td>9,800<\/td><td>4 ms<\/td><td>up to 30 s<\/td><\/tr><tr><td>commit=60<\/td><td>11,500<\/td><td>3.4 ms<\/td><td>up to 60 s<\/td><\/tr><tr><td>data=writeback, commit=5<\/td><td>15,200<\/td><td>2.6 ms<\/td><td>ordering guarantee lost<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Read the last row carefully. The biggest single win comes from <code>data=writeback<\/code>, not from the commit interval &#8211; but writeback removes the ordering guarantee, which means a crash can leave you with a file containing newly written data and stale metadata, or metadata pointing at uninitialised blocks. On a VPS with no battery-backed controller, that is a genuine exposure.<\/p>\n\n\n<h2 class=\"wp-block-heading\">Testing Actual Crash Exposure<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You can quantify the window rather than arguing about it. Write a timestamped record to a file every 100 ms, then trigger an abrupt reset and inspect how many records survived. The gap between the last flush and the reset is your real exposure.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># on the guest, before the test\n( while true; do date +%s.%N &gt;&gt; \/root\/durability.log; sleep 0.1; done ) &amp;\n# then hard-reset the VPS from the provider console\n# after boot:\ntail -5 \/root\/durability.log; stat -c '%y' \/root\/durability.log<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Compare the last logged timestamp against the recorded reset time. With <code>commit=5<\/code> the gap stays inside a few hundred milliseconds; with <code>commit=60<\/code> it can reach tens of seconds. That number, not the IOPS figure, is what you present to whoever owns the data.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Interaction With Snapshots and Virtualised Storage<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">On a VPS the physical device is already behind a cache. Raising <code>commit<\/code> while also disabling barriers (<code>barrier=0<\/code>) compounds the risk multiplicatively: the hypervisor may acknowledge the write while it still sits in host RAM, so a host-level failure loses data the guest believed was committed. The kernel will warn about this in dmesg if the device cannot honour a cache flush.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dmesg | grep -iE 'barrier|flush|write cache'\ncat \/sys\/block\/vda\/queue\/write_cache   # 'write back' means flushes matter<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If <code>write_cache<\/code> reports <code>write back<\/code>, barriers are doing real work and must stay enabled. Only a device reported as <code>write through<\/code> makes <code>barrier=0<\/code> safe, and that is rare on virtual storage.<\/p>\n\n\n\n\n<h2 class=\"wp-block-heading\">Applying the Change Safely<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code># Test non-destructively without a reboot\nmount -o remount,commit=30 \/\ncat \/proc\/mounts | grep ' \/ '\n# Make it persistent\nsed -i 's|^\\(.* \/ .*ext4.*\\)|\\1,commit=30|' \/etc\/fstab || true\nfindmnt --verify --verbose<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Always verify with <code>findmnt --verify<\/code> before rebooting. A malformed fstab that prevents the root filesystem from mounting turns a tuning change into an unbootable VPS.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">When NOT to Raise the Interval<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Leave the default in place if any of the following apply. The throughput gain is not worth the recovery complexity.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>You run a database.<\/strong> Databases call fsync at the right moment regardless of the interval, so raising it buys nothing while widening the window for non-transactional files.<\/li><li><strong>You have no UPS and no provider snapshot guarantee.<\/strong> A host power event is exactly the scenario the interval protects against.<\/li><li><strong>The filesystem holds audit or compliance logs.<\/strong> Losing 30 seconds of authentication records is usually unacceptable.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Pairs Well With Other I\/O Tuning<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The commit interval is one lever among several. Pair it with an appropriate I\/O scheduler and mount flags for your storage type &#8211; the measured comparisons in <a href=\"https:\/\/virtualserversvps.com\/\">our VPS comparison table<\/a> show which providers expose real NVMe with a usable multi-queue scheduler versus emulated SATA. If you are still selecting a host, the workflow in <a href=\"https:\/\/virtualserversvps.com\/\">the VPS guides hub<\/a> walks through benchmarking disk behaviour before you commit. And if write latency rather than write volume is your bottleneck, confirm you are not measuring queue contention from a noisy neighbour before you touch fstab at all.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The honest summary: raise <code>commit<\/code> only when you have measured a write-batching problem, only when your workload does not fsync, and only when you can tolerate the wider loss window. Default to 5; justify every increase with a number.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Every ext4 filesystem on your VPS makes a silent promise: after fsync() returns, the data is on stable storage. Between those explicit syncs, the kernel batches writes and flushes the&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":2,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-1238","post","type-post","status-publish","format-standard","hentry","category-performance-optimization"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.1 (Yoast SEO v26.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>ext4 Journal Commit Interval on a VPS: The Durability vs Throughput Tradeoff, Measured - Virtual Servers VPS Blog<\/title>\n<meta name=\"description\" content=\"Every ext4 filesystem on your VPS makes a silent promise: after fsync() returns, the data is on stable storage. Between those explicit syncs, the kernel\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/virtualserversvps.com\/blog\/ext4-journal-commit-interval-durability-tradeoff-vps\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"ext4 Journal Commit Interval on a VPS: The Durability vs Throughput Tradeoff, Measured\" \/>\n<meta property=\"og:description\" content=\"ext4 Journal Commit Interval on a VPS: The Durability vs Throughput Tradeoff, Measured\" \/>\n<meta property=\"og:url\" content=\"https:\/\/virtualserversvps.com\/blog\/ext4-journal-commit-interval-durability-tradeoff-vps\/\" \/>\n<meta property=\"og:site_name\" content=\"Virtual Servers VPS Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-28T02:32:14+00:00\" \/>\n<meta name=\"author\" content=\"Virtual-Servers-Vps-Editor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Virtual-Servers-Vps-Editor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/ext4-journal-commit-interval-durability-tradeoff-vps\/\",\"url\":\"https:\/\/virtualserversvps.com\/blog\/ext4-journal-commit-interval-durability-tradeoff-vps\/\",\"name\":\"ext4 Journal Commit Interval on a VPS: The Durability vs Throughput Tradeoff, Measured - Virtual Servers VPS Blog\",\"isPartOf\":{\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#website\"},\"datePublished\":\"2026-09-28T02:32:14+00:00\",\"author\":{\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0\"},\"description\":\"Every ext4 filesystem on your VPS makes a silent promise: after fsync() returns, the data is on stable storage. Between those explicit syncs, the kernel\",\"breadcrumb\":{\"@id\":\"https:\/\/virtualserversvps.com\/blog\/ext4-journal-commit-interval-durability-tradeoff-vps\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/virtualserversvps.com\/blog\/ext4-journal-commit-interval-durability-tradeoff-vps\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/ext4-journal-commit-interval-durability-tradeoff-vps\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/virtualserversvps.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ext4 Journal Commit Interval on a VPS: The Durability vs Throughput Tradeoff, Measured\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#website\",\"url\":\"https:\/\/virtualserversvps.com\/blog\/\",\"name\":\"Virtual Servers VPS Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/virtualserversvps.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0\",\"name\":\"Virtual-Servers-Vps-Editor\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d820b15f1cd028e97610d9adf536df7be5cb6423869967037d468d5355fa003f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d820b15f1cd028e97610d9adf536df7be5cb6423869967037d468d5355fa003f?s=96&d=mm&r=g\",\"caption\":\"Virtual-Servers-Vps-Editor\"},\"sameAs\":[\"https:\/\/virtualserversvps.com\/blog\"],\"url\":\"https:\/\/virtualserversvps.com\/blog\/author\/virtualserversvps\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"ext4 Journal Commit Interval on a VPS: The Durability vs Throughput Tradeoff, Measured - Virtual Servers VPS Blog","description":"Every ext4 filesystem on your VPS makes a silent promise: after fsync() returns, the data is on stable storage. Between those explicit syncs, the kernel","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:\/\/virtualserversvps.com\/blog\/ext4-journal-commit-interval-durability-tradeoff-vps\/","og_locale":"en_US","og_type":"article","og_title":"ext4 Journal Commit Interval on a VPS: The Durability vs Throughput Tradeoff, Measured","og_description":"ext4 Journal Commit Interval on a VPS: The Durability vs Throughput Tradeoff, Measured","og_url":"https:\/\/virtualserversvps.com\/blog\/ext4-journal-commit-interval-durability-tradeoff-vps\/","og_site_name":"Virtual Servers VPS Blog","article_published_time":"2026-09-28T02:32:14+00:00","author":"Virtual-Servers-Vps-Editor","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Virtual-Servers-Vps-Editor","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/virtualserversvps.com\/blog\/ext4-journal-commit-interval-durability-tradeoff-vps\/","url":"https:\/\/virtualserversvps.com\/blog\/ext4-journal-commit-interval-durability-tradeoff-vps\/","name":"ext4 Journal Commit Interval on a VPS: The Durability vs Throughput Tradeoff, Measured - Virtual Servers VPS Blog","isPartOf":{"@id":"https:\/\/virtualserversvps.com\/blog\/#website"},"datePublished":"2026-09-28T02:32:14+00:00","author":{"@id":"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0"},"description":"Every ext4 filesystem on your VPS makes a silent promise: after fsync() returns, the data is on stable storage. Between those explicit syncs, the kernel","breadcrumb":{"@id":"https:\/\/virtualserversvps.com\/blog\/ext4-journal-commit-interval-durability-tradeoff-vps\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/virtualserversvps.com\/blog\/ext4-journal-commit-interval-durability-tradeoff-vps\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/virtualserversvps.com\/blog\/ext4-journal-commit-interval-durability-tradeoff-vps\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/virtualserversvps.com\/blog\/"},{"@type":"ListItem","position":2,"name":"ext4 Journal Commit Interval on a VPS: The Durability vs Throughput Tradeoff, Measured"}]},{"@type":"WebSite","@id":"https:\/\/virtualserversvps.com\/blog\/#website","url":"https:\/\/virtualserversvps.com\/blog\/","name":"Virtual Servers VPS Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/virtualserversvps.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/82a299a8284a66ff49f97c74684724a0","name":"Virtual-Servers-Vps-Editor","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/virtualserversvps.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d820b15f1cd028e97610d9adf536df7be5cb6423869967037d468d5355fa003f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d820b15f1cd028e97610d9adf536df7be5cb6423869967037d468d5355fa003f?s=96&d=mm&r=g","caption":"Virtual-Servers-Vps-Editor"},"sameAs":["https:\/\/virtualserversvps.com\/blog"],"url":"https:\/\/virtualserversvps.com\/blog\/author\/virtualserversvps\/"}]}},"_links":{"self":[{"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts\/1238","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/comments?post=1238"}],"version-history":[{"count":1,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts\/1238\/revisions"}],"predecessor-version":[{"id":1241,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/posts\/1238\/revisions\/1241"}],"wp:attachment":[{"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/media?parent=1238"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/categories?post=1238"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/virtualserversvps.com\/blog\/wp-json\/wp\/v2\/tags?post=1238"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}