Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp206232ybl; Wed, 22 Jan 2020 19:34:30 -0800 (PST) X-Google-Smtp-Source: APXvYqxs8qoJjeNsPokT3SRm8Nvn2zmiUarY1Qo1YdppYM87JtQiC4sF7BkdWrm1oCV8uqqyt/o9 X-Received: by 2002:a05:6808:4c7:: with SMTP id a7mr9126801oie.83.1579750469905; Wed, 22 Jan 2020 19:34:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579750469; cv=none; d=google.com; s=arc-20160816; b=EyLkMxKTigIbfdZ64JFCTk2/rqVz0QCePSXOypzOX1af0uwq1TPk5N+CV7xmmY0WWP q428/oMS+xU/6YSm3bS6MgN5fab57PNXwxlT7SFNTeNXGoP5095wgCZq23CeWZgKI8Wt LJggmouhYLZRffC3x19PXlfFmPFS58GwXuf3YsRJ7hqCt4EZTrIHuxfgn2yvVeAUPfLK LP9r+rURgpHE2jnf/KNP+Neyv/w04Nhc2NW/dmAikl62A1IbAhsGpafGwjkqFe6FeJ4Q xhqFLRIZ/G4aAR2AmgLAHFWAK3+9997gMSW3fn1S3oP8kWg072zJSOKRrjNQ1o29URzR 3hGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=RxdFDkgAn9D7lbbl4yJylyYxkkQhJf8CMYw3SePBV9o=; b=PvCwm/qpgu+O4iRcWIQLJVLbRsynQB18IJ0HLA2rPIfEBhfXWr2SpRa+xq04vw9kWU LIoh4cjsTKoCA9sQcp5XNf/dk2wKhH+5btQS6ndkFsJog7bvdSm5oJJEUWfA7kObd0Zp v/HhvBffmsKV8cYZKWnnmyzJBXueKAyh0Ay/Qjab+DAeumZ3zo/DYCRAXFB9JX1yJ2+O 1dp2Lt4CaadQT2N1frZHNpVZn3P1djFasmrMZK8fcr+ccDiE9pS2kcH77yFhBCmQqHEG YN29WzkYEGIRH9beTXuJMM6w7dgeXVmviFNlIYDHwDZyHFrQHEFZyQYiUz9zBCY7Vkwe uJJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rubrik.com header.s=google header.b=BYJ2qNI+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=rubrik.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w16si266738oih.154.2020.01.22.19.34.17; Wed, 22 Jan 2020 19:34:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@rubrik.com header.s=google header.b=BYJ2qNI+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=rubrik.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726227AbgAWDdU (ORCPT + 99 others); Wed, 22 Jan 2020 22:33:20 -0500 Received: from mail-ed1-f67.google.com ([209.85.208.67]:34842 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726061AbgAWDdU (ORCPT ); Wed, 22 Jan 2020 22:33:20 -0500 Received: by mail-ed1-f67.google.com with SMTP id f8so1904995edv.2 for ; Wed, 22 Jan 2020 19:33:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rubrik.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RxdFDkgAn9D7lbbl4yJylyYxkkQhJf8CMYw3SePBV9o=; b=BYJ2qNI+dBv9tMqAzPkNiFA8z9l53d8vo0bg/tFL47LkX+SYG7a2xh0ziiWtuZWBZO 7l+/irlHAIPylkhRRyb2CWJvZXrzhBhvjKecPZ0Vap+X0mH/k4ZxxE3jITGNBimF17Kh Y4rrnRxqYRANwYYsT4Kq6aj9NXFU65B1qvrOg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RxdFDkgAn9D7lbbl4yJylyYxkkQhJf8CMYw3SePBV9o=; b=MD0I/6IS0DHt/BHDqcFT/3Aa8VsqWUmrIYb7cldUH3tkxtSHxA9+MhokKWgVVfUaGt y5eqevzudCoGdM6nCVhooh3YKDbuAA0xD3vLu8aET4H2JJcrlGacVrPFMrwbKZb60obF qLPDLVmk7kiamBe1eDC1AdR5J+OEgVFIt55mOW/cPe5K2wp+bl/11WcIuhMrnbFLsIFo Kv5R9FBE2wUfeKZBgWXgqM3i+fpSH77nVEOguqHbI6iIK41XZhCSXNfq4h8vHLDchEP9 S4oTSofGJ7fKvlSh9dCH99i/HNdOmvvvxTe7KTQ63XSo7WTdDbNryT8i/A+WRVtTHOzN ohhA== X-Gm-Message-State: APjAAAU5LkkzCee1yWt5XHWXEGb+usnftoLT8BnfNv+uxDNo9ehE9EcB KlmU3U2/btSQdu5rXub5hi53Xzs0CGyAzehpi8GQ X-Received: by 2002:a17:906:404:: with SMTP id d4mr5358857eja.326.1579750398495; Wed, 22 Jan 2020 19:33:18 -0800 (PST) MIME-Version: 1.0 References: <20200121201014.52345-1-muraliraja.muniraju@rubrik.com> In-Reply-To: From: Muraliraja Muniraju Date: Wed, 22 Jan 2020 19:33:07 -0800 Message-ID: Subject: Re: Re [PATCH] Adding multiple workers to the loop device. To: Ming Lei Cc: Chaitanya Kulkarni , Jens Axboe , linux-block , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I used dd to test dd if=/tmp/mount/home/ubuntu/os_disk_partition/genesisTool/4Fz of=/dev/null bs=1M count=53687091200 skip=0 iflag=skip_bytes,count_bytes,direct & dd if=/tmp/mount/home/ubuntu/os_disk_partition/genesisTool/4Fz of=/dev/null bs=1M count=53687091200 skip=53687091200 iflag=skip_bytes,count_bytes,direct & dd if=/tmp/mount/home/ubuntu/os_disk_partition/genesisTool/4Fz of=/dev/null bs=1M count=53687091200 skip=107374182400 iflag=skip_bytes,count_bytes,direct & dd if=/tmp/mount/home/ubuntu/os_disk_partition/genesisTool/4Fz of=/dev/null bs=1M count=53687091200 skip=161061273600 iflag=skip_bytes,count_bytes,direct & Here the file /tmp/mount/home/ubuntu/os_disk_partition/genesisTool/4Fz is a file in the ext4 file system that is accessed via a loop device. Also in the above change we have the default version to be always 1 worker. One can change the number of workers to handle the performance to their needs. In our case we saw that we got good performance with 4 threads even for sequential io. On Wed, Jan 22, 2020 at 5:40 PM Ming Lei wrote: > > On Wed, Jan 22, 2020 at 4:11 AM muraliraja.muniraju > wrote: > > > > Below is the dd results that I ran with the worker and without the worker changes. > > Enhanced Loop has the changes and ran with 1,2,3,4 workers with 4 dds running on the same loop device. > > Normal Loop is 1 worker(the existing code) with 4 dd's running on the same loop device. > > Enhanced loop > > 1 - READ: io=21981MB, aggrb=187558KB/s, minb=187558KB/s, maxb=187558KB/s, mint=120008msec, maxt=120008msec > > 2 - READ: io=41109MB, aggrb=350785KB/s, minb=350785KB/s, maxb=350785KB/s, mint=120004msec, maxt=120004msec > > 3 - READ: io=45927MB, aggrb=391802KB/s, minb=391802KB/s, maxb=391802KB/s, mint=120033msec, maxt=120033msec > > 4 - READ: io=45771MB, aggrb=390543KB/s, minb=390543KB/s, maxb=390543KB/s, mint=120011msec, maxt=120011msec > > Normal loop > > 1 - READ: io=18432MB, aggrb=157201KB/s, minb=157201KB/s, maxb=157201KB/s, mint=120065msec, maxt=120065msec > > 2 - READ: io=18762MB, aggrb=160035KB/s, minb=160035KB/s, maxb=160035KB/s, mint=120050msec, maxt=120050msec > > 3 - READ: io=18174MB, aggrb=155058KB/s, minb=155058KB/s, maxb=155058KB/s, mint=120020msec, maxt=120020msec > > 4 - READ: io=20559MB, aggrb=175407KB/s, minb=175407KB/s, maxb=175407KB/s, mint=120020msec, maxt=120020msec > > Could you share your exact test command? > > Multiple jobs may hurt performance in case of sequential IOs on HDD backend. > Also the 1st version of the loop dio patch uses normal wq, I remembered that > random IOperformance isn't improved much, meantime sequential IO perf drops > with normal wq, whentesting SSD backend. > > So I took kthread worker. > > Thanks, > Ming Lei