From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 098686EC58; Wed, 4 Aug 2021 15:41:00 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 098686EC58 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1628080860; bh=tbsttJAM/11aidS82iDbMYRJR2pRp6GifwoizclctWc=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=BFsBfYO71rKasw4WMp++EiotMQAfG3gSQ3QJ+1mnOyECZAXciJHD9Kmq/cr+abJL+ 1Z9rMug5cJKbSNNC4Iq+LaSkZncwwgbuICkzb3zda6QpsQ1OWJgrvnMKOABmKlYi1I ergH+2UlDxRfsjlA3LZFelKvuOfKKN73gL3sdL/8= Received: from smtpng1.i.mail.ru (smtpng1.i.mail.ru [94.100.181.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 27FE86EC58 for ; Wed, 4 Aug 2021 15:40:58 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 27FE86EC58 Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1mBGCf-00083Q-CT; Wed, 04 Aug 2021 15:40:57 +0300 Date: Wed, 4 Aug 2021 15:40:56 +0300 To: Vladislav Shpilevoy Cc: tarantool-patches@dev.tarantool.org Message-ID: <20210804124056.6zija4nuptasavh6@esperanza> References: <36e2d301-0281-d3c0-37d2-e6343fa04fb7@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <36e2d301-0281-d3c0-37d2-e6343fa04fb7@tarantool.org> X-4EC0790: 10 X-7564579A: 78E4E2B564C1792B X-77F55803: 4F1203BC0FB41BD941C43E597735A9C3FDAB68B812060C77E97CF8617D978122182A05F538085040C8718FB8ACD193E862A250AC6FEDAF1C75EF01D499869D850075546FB1761575 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE760302A529BCAAAFCEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637B24541F05F0BFC9F8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8DB6424C25C82CC066B853AE44C664FC6117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCF1175FABE1C0F9B6A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD18E5D25F19253116ADD2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B65D56369A3576CBA5089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 0D63561A33F958A580A84A296DAF48752E5F95EE29E5147F1CF652D6736FD5E3D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7501A9DF589746230F410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D345CB6DE26F1654667737432F3C997288F82BDB1490260F264422BE588B6384BEEB3AC1AF82069160F1D7E09C32AA3244C65236447A156B949D79F145C4327FB2AF165894D92D62706FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojeDyvyeZJDJGyxbftb3RN5g== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5D4C585E78980D63260C9C0E95A0A63CCD274CEFED1673C562683ABF942079399BFB559BB5D741EB966A65DFF43FF7BE03240331F90058701C67EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH 00/20] Rewrite performance critical parts of net.box in C X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Vladimir Davydov via Tarantool-patches Reply-To: Vladimir Davydov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" On Wed, Aug 04, 2021 at 01:05:37AM +0200, Vladislav Shpilevoy wrote: > Did you try to port netbox to direct usage of ev_io instead of a dedicated > fiber + coio_wait wrapper? Do you think it is worth trying? The only problem > I see is the necessity to call on_connect/on_disconnect/on_schema_reload/... > triggers somewhere but the scheduler fiber, because they are allowed to yield. > > The pros is that you won't call ev_io_start/ev_io_stop on each 'communicate' > iteration. AFAIR, on Linux they lead to epoll_ctl() to add/remove a descriptor > from epoll, and these calls are expensive. > > At that point the netbox state machine does not seem to be doing much in Lua. > Even if you keep the fiber, it could be ported to C entirely. It is now only > 270 lines including empty lines and comments. No, I haven't tried or even planned to do that, but I agree it might improve overall net.box performance - at the very least it will reduce the number of Lua function calls, because perform_async_request and perform_request will be called directly, without Lua wrappers. Still, this doesn't block this series and we can easily do it on top. I opened a ticket so that we don't forget: https://github.com/tarantool/tarantool/issues/6291