From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kara Subject: Ext2/3 block remapping tool Date: Thu, 26 Apr 2007 21:29:53 +0200 Message-ID: <20070426192953.GC2841@duck.suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: linux-fsdevel@vger.kernel.org Return-path: Received: from styx.suse.cz ([82.119.242.94]:35758 "EHLO duck.suse.cz" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754934AbXDZTUs (ORCPT ); Thu, 26 Apr 2007 15:20:48 -0400 Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Hello, I've been lately playing with remapping ext2/ext3 blocks (especially how much it can give us in terms of speed of things like KDE start). For that I've written two simple tools (you can get them from ftp.suse.com/pub/people/jack/ext3remapper.tar.gz): e2block2file to transform (preparsed) output from blktrace into a list of accessed files and offsets accessed e2remapblocks to use output from e2block2file and remap blocks into big chunks in the order in which they were accessed. (see README in the tools archive for more details) So far the tools (especially e2remapblocks ;) work on unmounted filesystem. The ultimate goal is to be able to do similar things for mounted filesystems but I wanted to see whether block remapping is worth it and what kernel interfaces would be useful for achieving the goal. BTW, the results for KDE startup are as follows: The root partition was about 4.8 GB with around 1 GB free. System has 1GB mem. All measurements (except for warmcache) were performed after sync; echo 3 >/proc/sys/vm/drop_caches Ordinary start: 19.2 20.3 19.5 19.8 19.3; avg. 19.62 Start with all data cached: 7 7.6 7.3 7.1 7.1; avg. 7.22 Start with fcache (see thread http://lkml.org/lkml/2006/5/15/46 for details on fcache): 11.3 11 10.3 10.8 10.6; avg. 10.8 Start with blocks remapped with e2remapblocks: 13.5 15 13 14.5 14.5; avg. 14.1 (after remapping, data was stored in 20 continguous extents on disk) Honza -- Jan Kara SuSE CR Labs