From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-f68.google.com ([209.85.166.68]:42044 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727075AbeIYPPa (ORCPT ); Tue, 25 Sep 2018 11:15:30 -0400 Received: by mail-io1-f68.google.com with SMTP id n18-v6so19866172ioa.9 for ; Tue, 25 Sep 2018 02:08:56 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <153666073461.19117.1958730317836145457.stgit@localhost.localdomain> References: <153666041612.19117.14667042009014596105.stgit@localhost.localdomain> <153666073461.19117.1958730317836145457.stgit@localhost.localdomain> From: Miklos Szeredi Date: Tue, 25 Sep 2018 11:08:55 +0200 Message-ID: Subject: Re: [PATCH 3/3] fuse: Use hash table to link processing request To: Kirill Tkhai Cc: kuznet@virtuozzo.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Sep 11, 2018 at 12:12 PM, Kirill Tkhai wrote: > We noticed the performance bottle neck in FUSE running our > Virtuozzo storage over rdma. On some types of workload > we observe 20% of times pent in request_find() in profiler. > This function is iterating over long requests list, and it > scales bad. > > The patch introduces hash table to reduce the number > of iterations, we do in this function. Hash generating > algorithm is taken from hash_add() function, while > 512 lines table is used to store pending requests. > This fixes problem and improves the performance. Pushed to fuse.git#for-next with a number of small changes. E.g. I reduced the number of cachlines to 256 to make the hashtable size just 4k. Was there a scientific reason for choosing 512 as the optimal number of cache lines? Thanks, Miklos