Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp316020pxu; Thu, 3 Dec 2020 00:28:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJyYQIyt1tOqkux4Z64hQvCg+DHnNlIIMMBx0HMc11Uo23g4r6GuqtZ2t0HahscuTouY6UQZ X-Received: by 2002:a17:906:a052:: with SMTP id bg18mr1543419ejb.550.1606984119844; Thu, 03 Dec 2020 00:28:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606984119; cv=none; d=google.com; s=arc-20160816; b=rETFoPFRTQht/bqdCuV2+/67ehedpscbDppKXg2Uv4U4cC/cjf7QnZoN9dj6jYtgcG kPxuSKac9E3CCGKfHZmiADCZUYiM7y8fkier2YmlvRRwFowUNLoT5fAhkmazKLe7J0qh KYJMv7T2q2kJQzIDiE7W4kzTHwByir/+mb26SFNrPiSrV/4wPBsxflhSAR25wdf7FSc+ EOS2Sc2xk2yYIU7ADVtttIuh2YbQe9eNS5Je/GvPLjoBeARuKTc4LvqVS1Vdif2vWTaD NHbTkrRTCkgzPf82WONl4Dvn4U8XLtG1c1DMnfuy2YucDaxQdvdVOlGyJnIeQeP/vlV1 4hRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=3dm5k7cN6MnOPnZiMXezyGVuUovU3fFHu4VLmiRYUQk=; b=RBD01nrgZPDRXc7uKBExyOuG7onVCLfd4cMbyznXDIydidlAjOHX63zsi1xcdESCDm WOdGOmFwOtL8ESVEtkC3fVc2/PdSWKvQG/j6kYkZ5eDbm8KAW7DrXGamoJWe3zJ9COiB moJoxUGeRiI3qKg6IaZ+gqusOGU284p6YyojGviEAD/zUON+LN+biL9HIvp9K7K0MI0u y86t8A1UFh0DSiKwegrjIPMuRE2NFGQ2iyNYe5+YGDCf+5Xlo9LfwDBvEsCQhWAHUcOi ZfNpR8Ujzry9lKMynbn07hJPWJnZsQlOQ0QF3F/qZAfjet8L/Jz6YxerigyvTNqjQWYG Wvkw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b26si739094ejb.140.2020.12.03.00.28.15; Thu, 03 Dec 2020 00:28:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388109AbgLCI1M convert rfc822-to-8bit (ORCPT + 99 others); Thu, 3 Dec 2020 03:27:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387683AbgLCI1M (ORCPT ); Thu, 3 Dec 2020 03:27:12 -0500 X-Greylist: delayed 308 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 03 Dec 2020 00:26:32 PST Received: from mail.lichtvoll.de (lichtvoll.de [IPv6:2001:67c:14c:12f::11:100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06719C061A4D for ; Thu, 3 Dec 2020 00:26:32 -0800 (PST) Received: from 127.0.0.1 (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.lichtvoll.de (Postfix) with ESMTPSA id 17C5F1937FB; Thu, 3 Dec 2020 09:20:42 +0100 (CET) From: Martin Steigerwald To: Ext4 Cc: lokesh jaliminche , Andrew Morton Subject: Re: improved performance in case of data journaling Date: Thu, 03 Dec 2020 09:20:41 +0100 Message-ID: <1870131.usQuhbGJ8B@merkaba> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="UTF-8" Authentication-Results: mail.lichtvoll.de; auth=pass smtp.auth=martin smtp.mailfrom=martin@lichtvoll.de Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org lokesh jaliminche - 03.12.20, 08:28:49 CET: > I have been doing experiments to analyze the impact of data journaling > on IO latencies. Theoretically, data journaling should show long > latencies as compared to metadata journaling. However, I observed > that when I enable data journaling I see improved performance. Is > there any specific optimization for data journaling in the write > path? This has been discussed before as Andrew Morton found that data journalling would be surprisingly fast with interactive write workloads. I would need to look it up in my performance training slides or use internet search to find the reference to that discussion again. AFAIR even Andrew had no explanation for that. So I thought why would I have one? However an idea came to my mind: The journal is a sequential area on the disk. This could help with harddisks I thought at least if if it I/O mostly to the same not too big location/file – as you did not post it, I don't know exactly what your fio job file is doing. However the latencies you posted as well as the device name certainly point to fast flash storage :). Another idea that just came to my mind is: AFAIK ext4 uses quite some delayed logging and relogging. That means if a block in the journal is changed another time within a certain time frame Ext4 changes it in memory before the journal block is written out to disk. Thus if the same block if overwritten again and again in short time, at least some of the updates would only happen in RAM. That might help latencies even with NVMe flash as RAM usually still is faster. Of course I bet that Ext4 maintainers have a more accurate or detailed explanation than I do. But that was at least my idea about this. Best, -- Martin