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 254A16EC40; Fri, 13 Aug 2021 12:57:07 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 254A16EC40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1628848627; bh=cgLnlCC4l0bTk75ADFCrOGwVmaIyHA4TGngiI1MIBf0=; 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=mOPC7XT8AEm7xOMK1F/SOutlVRn2mk0mHlix+UQi4EdThn3YCPUXud/l03XDOJaAX Mw+neWk4Kq4SNgBdemvjyWGCzzSJB2VZW+g4wOdqZ1SPRATGinh33WI9DzoGl2PxZ/ Mi2ElqtyK/vkmhi9RoDh+ZEDpdhuDXblo5UdAhcI= 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 136FA6EC40 for ; Fri, 13 Aug 2021 12:57:06 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 136FA6EC40 Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1mETw0-000297-1k; Fri, 13 Aug 2021 12:57:04 +0300 Date: Fri, 13 Aug 2021 12:57:00 +0300 To: Igor Munkin Cc: v.shpilevoy@tarantool.org, tarantool-patches@dev.tarantool.org Message-ID: <20210813095700.7vumduzrevgmcuyi@esperanza> References: <20210812181356.GO27855@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210812181356.GO27855@tarantool.org> X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD92087353F0EC44DD972FF4A7D76DB5E242D14FEF1BD8BF4AC182A05F53808504006E800F1077F7A399CCB3C1617EAEF3F1E0D143BD29A4BDD05A94FA8A3C0EAFD X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE79145AB6E9E75F07EEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637C5BAFDCCAC60DA968638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D89187CE417EB6903F0E6B43D13320F7C8117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC8C7ADC89C2F0B2A5A471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F44604297287769387670735201E561CDFBCA1751FF04B652EEC242312D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B613439FA09F3DCB32089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-C1DE0DAB: 0D63561A33F958A5041B03086C212AC3FEAD7B80E4BFF1E9FA36E2A1112A4CB2D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA750E14360347543F58410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34CAFBC0A7A4BEEE018E61C841376D83C29F6E31BA58015EFA50DC00F7E5BCB3FF0D54574907AB86501D7E09C32AA3244C0B3C6A094DCCD0276AA487477E98A538259227199D06760A927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj0dLV0c3jbkzra+sS1+BnYQ== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5D1CB29050C05842A887AC6770C422D6DC274CEFED1673C562683ABF942079399BFB559BB5D741EB966A65DFF43FF7BE03240331F90058701C67EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH] net.box: allow to store user-defined fields in future object 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 Thu, Aug 12, 2021 at 09:13:56PM +0300, Igor Munkin wrote: > Vova, > > Thanks for the patch! I am curious why Lua tables are not chosen for > storing users data? It looks more natural (kinda netbox request storage > that would be similar to the fiber's one), and easier to implement. Of > course the only thing bothering me about Lua tables usage is Lua GC > pressure. However: > * Whether there are *too* much entries, TABOV might occur for REGISTRY > table and keeping many tables (especially short living ones) at once > is also not such good option. > * In case there are *just* much entries, I perhaps that REGISTRY > performance is better that spawning lots of tables. Anyway, I haven't > look on the mhash implementation, so I have no estimations about its > perfomance. I see they are created and destroyed manually, but Lua > tables are within the GC reign, so some time is spent on their > traversal. At the same time, REGISTRY traversal is atomic, so > inflating it also affects the time spent on a particular incremental > GC step. Too much theory, BTW. Benchmarks are required for this case. > * If this is more an exceptional option (that's I doubt considering > Yaroslav complains regarding this functionality breakage), then any of > the option is fine IMHO, so the most convenient is preferable. > > It would be great to see the comparison for your current implementation > and the one using Lua tables. The most interesting workload is a bunch > of short-term requests, I guess. According to my measurements, Lua tables perform slightly better (+1%) than mhash. The code looks simpler as well so I'll go with Lua tables. Will send v3 in reply to this email. Thanks!