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 A9AA86EC58; Wed, 4 Aug 2021 02:05:40 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A9AA86EC58 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1628031940; bh=k0VaSkp7ePnTcye/LGxLoQdR9Ye7zA651RX0V3X3mmU=; h=To:References:Date:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=hNhyvkpG5I68dl62d9lkpskulVig66X4jQ7tjRm7Vj+YpHsvm3sXz0c/XT0qHE8dR 2uvf2NNxnERi5su8G+l+oJD2VajAJJYQN2l9+Gpfi2HcCXmYJ779emSffpAwi6iz9w FhycvUeMYQwxqOSpbPFDW3T6qDBA+94Z4OZonmzs= Received: from smtpng2.i.mail.ru (smtpng2.i.mail.ru [94.100.179.3]) (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 8DEBC6EC58 for ; Wed, 4 Aug 2021 02:05:39 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 8DEBC6EC58 Received: by smtpng2.m.smailru.net with esmtpa (envelope-from ) id 1mB3Te-0001dq-HZ; Wed, 04 Aug 2021 02:05:38 +0300 To: Vladimir Davydov , tarantool-patches@dev.tarantool.org References: Message-ID: <36e2d301-0281-d3c0-37d2-e6343fa04fb7@tarantool.org> Date: Wed, 4 Aug 2021 01:05:37 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD941C43E597735A9C351B198F4576AC7B21928AAE70459C21B182A05F53808504023F35C8F0F5F55CB6A2DD4B5A1F047FE9EFD59699F35B2A04420FFA8787429C1 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE700B5EAEB6F2DE1BDEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F790063753275FB77F6A31628638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D81320CC3071572920A88C4B7EB5453771117882F4460429724CE54428C33FAD305F5C1EE8F4F765FCF1175FABE1C0F9B6A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD182CC0D3CB04F14752D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B613439FA09F3DCB32089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 0D63561A33F958A54CE7F1AAA31A42A41E173D5555DEDECA883FD63E19FB3C70D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA751B940EDA0DFB0535410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3429538671E6527D329896049BBAE318DADA5127CE03B547F6489FCE70F6A1AFCF502CC7B65A549B861D7E09C32AA3244C36931E95ED0A605040AB63CD66450BED63871F383B54D9B3729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojeDyvyeZJDJFP+HVAaorrlw== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5D72B3A671C171DDD0495C34D4EDC643493841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B 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: Vladislav Shpilevoy via Tarantool-patches Reply-To: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 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.