Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753093Ab1BVCcS (ORCPT ); Mon, 21 Feb 2011 21:32:18 -0500 Received: from li9-11.members.linode.com ([67.18.176.11]:59811 "EHLO test.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751816Ab1BVCcR (ORCPT ); Mon, 21 Feb 2011 21:32:17 -0500 Date: Mon, 21 Feb 2011 21:32:11 -0500 From: "Ted Ts'o" To: "Alexander V. Lukyanov" Cc: linux-ext4@vger.kernel.org, Andreas Dilger , linux-kernel@vger.kernel.org Subject: Re: [PATCH] ext4: allow inode_readahead_blks=0 (linux-2.6.37) Message-ID: <20110222023211.GF2924@thunk.org> Mail-Followup-To: Ted Ts'o , "Alexander V. Lukyanov" , linux-ext4@vger.kernel.org, Andreas Dilger , linux-kernel@vger.kernel.org References: <20110208063925.GA13619@lw.yar.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110208063925.GA13619@lw.yar.ru> User-Agent: Mutt/1.5.20 (2009-06-14) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on test.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1056 Lines: 26 On Tue, Feb 08, 2011 at 09:39:25AM +0300, Alexander V. Lukyanov wrote: > Hello! > > I cannot disable inode-read-ahead feature of ext4 (on 2.6.37): > > # echo 0 > /sys/fs/ext4/sda2/inode_readahead_blks > bash: echo: write error: Invalid argument > > On a server with lots of small files and random access this read-ahead makes > performance worse, and I'd like to disable it. I work around this problem > by using value of 1, but it still reads an extra block. So I'm curious --- have you actually benchmarked a performance decrease? What sort of hardware are you using? The readahead should be changing a 4k read to a 8k read with a value of 1, which shouldn't take a much of a difference to a HDD. I can apply this patch, but is it really making a difference for you? - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/