From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753312Ab2A2QVH (ORCPT ); Sun, 29 Jan 2012 11:21:07 -0500 Received: from mga03.intel.com ([143.182.124.21]:55017 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752692Ab2A2QVF (ORCPT ); Sun, 29 Jan 2012 11:21:05 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.71,315,1320652800"; d="scan'208";a="100879313" Date: Mon, 30 Jan 2012 00:10:58 +0800 From: Wu Fengguang To: Eric Dumazet Cc: Herbert Poetzl , Andrew Morton , LKML , Jens Axboe , Tejun Heo Subject: Re: Bad SSD performance with recent kernels Message-ID: <20120129161058.GA13156@localhost> References: <20120127060034.GG29272@MAIL.13thfloor.at> <20120128125108.GA9661@localhost> <1327757611.7199.6.camel@edumazet-laptop> <20120129055917.GB8513@localhost> <1327831380.14602.6.camel@edumazet-laptop> <20120129111645.GA5839@localhost> <1327842831.2718.2.camel@edumazet-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1327842831.2718.2.camel@edumazet-laptop> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jan 29, 2012 at 02:13:51PM +0100, Eric Dumazet wrote: > Le dimanche 29 janvier 2012 à 19:16 +0800, Wu Fengguang a écrit : > > > > Note that as long as buffered read(2) is used, it makes almost no > > difference (well, at least for now) to do "dd bs=128k" or "dd bs=2MB": > > the 128kb readahead size will be used underneath to submit read IO. > > > > Hmm... > > # echo 3 >/proc/sys/vm/drop_caches ;dd if=/dev/sda of=/dev/null bs=128k count=32768 > 32768+0 enregistrements lus > 32768+0 enregistrements écrits > 4294967296 octets (4,3 GB) copiés, 20,7718 s, 207 MB/s > > > # echo 3 >/proc/sys/vm/drop_caches ;dd if=/dev/sda of=/dev/null bs=2M count=2048 > 2048+0 enregistrements lus > 2048+0 enregistrements écrits > 4294967296 octets (4,3 GB) copiés, 27,7824 s, 155 MB/s Interesting. Here are my test results: root@lkp-nex04 /home/wfg# echo 3 >/proc/sys/vm/drop_caches ;dd if=/dev/sda of=/dev/null bs=128k count=32768 32768+0 records in 32768+0 records out 4294967296 bytes (4.3 GB) copied, 19.0121 s, 226 MB/s root@lkp-nex04 /home/wfg# echo 3 >/proc/sys/vm/drop_caches ;dd if=/dev/sda of=/dev/null bs=2M count=2048 2048+0 records in 2048+0 records out 4294967296 bytes (4.3 GB) copied, 19.0214 s, 226 MB/s Maybe the /dev/sda performance bug on your machine is sensitive to timing? Thanks, Fengguang