Received: from eggs.gnu.org ([2001:4830:134:3::10]:60444) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2jTp-0006Ar-2n for qemu-devel@nongnu.org; Fri, 04 Nov 2016 14:44:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c2jTl-0004DJ-Rm for qemu-devel@nongnu.org; Fri, 04 Nov 2016 14:44:45 -0400 Received: from mail1.bemta12.messagelabs.com ([216.82.251.13]:45064) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c2jTl-0004Bi-CY for qemu-devel@nongnu.org; Fri, 04 Nov 2016 14:44:41 -0400 From: Ketan Nilangekar Date: Fri, 4 Nov 2016 18:44:38 +0000 Message-ID: <54BB0357-97A9-4AE7-8147-63CD1D7637AC@veritas.com> References: <1475035789-685-1-git-send-email-ashish.mittal@veritas.com> <20160930083606.GA5411@stefanha-x1.localdomain> , <20161104094907.GB9817@stefanha-x1.localdomain> In-Reply-To: <20161104094907.GB9817@stefanha-x1.localdomain> Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH v7 RFC] block/vxhs: Initial commit to add Veritas HyperScale VxHS block device support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Ashish Mittal , "qemu-devel@nongnu.org" , "pbonzini@redhat.com" , "kwolf@redhat.com" , "armbru@redhat.com" , "berrange@redhat.com" , "jcody@redhat.com" , "famz@redhat.com" , Ashish Mittal , Abhijit Dey > On Nov 4, 2016, at 2:49 AM, Stefan Hajnoczi wrote: >=20 >> On Thu, Oct 20, 2016 at 01:31:15AM +0000, Ketan Nilangekar wrote: >> 2. The idea of having multi-threaded epoll based network client was to d= rive more throughput by using multiplexed epoll implementation and (fairly)= distributing IOs from several vdisks (typical VM assumed to have atleast 2= ) across 8 connections.=20 >> Each connection is serviced by single epoll and does not share its conte= xt with other connections/epoll. All memory pools/queues are in the context= of a connection/epoll. >> The qemu thread enqueues IO request in one of the 8 epoll queues using a= round-robin. Responses are also handled in the context of an epoll loop an= d do not share context with other epolls. Any synchronization code that you= see today in the driver callback is code that handles the split IOs which = we plan to address by a) implementing readv in libqnio and b) removing the = 4MB limit on write IO size. >> The number of client epoll threads (8) is a #define in qnio and can easi= ly be changed. However our tests indicate that we are able to drive a good = number of IOs using 8 threads/epolls. >> I am sure there are ways to simplify the library implementation, but for= now the performance of the epoll threads is more than satisfactory. >=20 > Have you benchmarked against just 1 epoll thread with 8 connections? >=20 The first implementation of qnio was actually single threaded with 8 connec= tions. The single VM throughput at the time iirc was less than half of what= we are getting now. Especially with a workload doing IOs on multiple vdisk= s. I assume we will need some sort of cpu/core affinity to drive the most o= ut of a single epoll threaded design. Ketan > Stefan