From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2889DC3A5A3 for ; Wed, 28 Aug 2019 00:57:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 08CAB2173E for ; Wed, 28 Aug 2019 00:57:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726096AbfH1A5R (ORCPT ); Tue, 27 Aug 2019 20:57:17 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:50980 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726092AbfH1A5R (ORCPT ); Tue, 27 Aug 2019 20:57:17 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 49ADBB0B9C51FE38F27C; Wed, 28 Aug 2019 08:57:15 +0800 (CST) Received: from [127.0.0.1] (10.133.208.128) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.439.0; Wed, 28 Aug 2019 08:57:09 +0800 Subject: Re: [Virtio-fs] [QUESTION] A performance problem for buffer write compared with 9p To: Miklos Szeredi References: <5abd7616-5351-761c-0c14-21d511251006@huawei.com> <20190820091650.GE9855@stefanha-x1.localdomain> <20190821160551.GD9095@stefanha-x1.localdomain> <954b5f8a-4007-f29c-f38e-dd5585879541@huawei.com> <0e8090c7-0c7c-bcbe-af75-33054d3a3efb@huawei.com> CC: Miklos Szeredi , Stefan Hajnoczi , linux-fsdevel , "virtio-fs@redhat.com" , piaojun From: wangyan Message-ID: <9e6b4aab-6939-e129-a048-d2fa272a0e0b@huawei.com> Date: Wed, 28 Aug 2019 08:57:08 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.133.208.128] X-CFilter-Loop: Reflected Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On 2019/8/26 20:39, Miklos Szeredi wrote: > On Sat, Aug 24, 2019 at 10:44 AM wangyan wrote: > >> According to the result, for "-size=1G", it maybe exceed the dirty pages' >> upper limit, and it frequently triggered pdflush for write-back. And for >> "-size=700M", it maybe didn't exceed the dirty pages' upper limit, so no >> extra pdflush was triggered. >> >> But for 9p using "-size=1G", the latency 3.94 usec, and the bandwidth is >> 2305.5MB/s. It is better than virtiofs using "-size=1G". It seems that >> it is not affected by the dirty pages' upper limit. > > I tried to reproduce these results, but failed to get decent > (>100MB/s) performance out of 9p. I don't have fscache set up, does > that play a part in getting high performance cached writes? Yes, you should open fscache. My mount command is: mount -t 9p -o trans=virtio,version=9p2000.L,rw,dirsync,nodev,msize=1000000000,cache=fscache sharedir /mnt/virtiofs/ Thanks, Yan Wang > > What you describe makes sense, and I have a new patch (attached), but > didn't see drastic improvement in performance of virtio-fs in my > tests. > > Thanks, > Miklos >