From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id D5F8327627 for ; Mon, 25 Feb 2019 11:47:01 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id n38WVHz9SE-n for ; Mon, 25 Feb 2019 11:47:01 -0500 (EST) Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 730FC27616 for ; Mon, 25 Feb 2019 11:47:01 -0500 (EST) Received: by mail-lj1-f195.google.com with SMTP id a17so8012945ljd.4 for ; Mon, 25 Feb 2019 08:47:01 -0800 (PST) Date: Mon, 25 Feb 2019 19:46:58 +0300 From: Konstantin Osipov Subject: [tarantool-patches] Re: [PATCH v3 1/7] memtx: introduce universal iterator_pool Message-ID: <20190225164658.GE2663@chai> References: <236d59ddf2ed9bb9c9e112763ca2dbd27424482a.1550849496.git.kshcherbatov@tarantool.org> <20190222183725.GD1691@chai> <20190224065622.wzutg7sgzviknqdf@esperanza> <20190224171504.GA17349@chai> <20190224182251.d65st3ncjheabeuf@esperanza> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190224182251.d65st3ncjheabeuf@esperanza> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org Cc: Kirill Shcherbatov * Vladimir Davydov [19/02/24 21:24]: > On Sun, Feb 24, 2019 at 08:15:04PM +0300, Konstantin Osipov wrote: > > * Vladimir Davydov [19/02/24 10:01]: > > > On Fri, Feb 22, 2019 at 09:37:25PM +0300, Konstantin Osipov wrote: > > > > * Kirill Shcherbatov [19/02/22 19:29]: > > > > > Memtx uses separate mempools for iterators of different types. > > > > > Due to the fact that there will be more iterators of different > > > > > sizes in a series of upcoming changes, let's always allocate the > > > > > iterator of the largest size. > > > > > > > > If rtree iterator is the one which is largest, let's use a > > > > separate pool for it. > > > > > > > > In general mempools are rather cheap. Each mempool takes a slab > > > > for ~100 objects and uses no slabs if there are no objects (e.g. > > > > if rtree index is not used, there is no mempool memory for it). > > > > > > But I'd rather prefer to use the same mempool for all kinds of iterator > > > objects to simplify the code. Take a look at how those mempools are > > > initialized on demand. IMO it looks ugly. Do we really want to save > > > those 500 of bytes that much to put up with that complexity? I don't know much, but a typical SAP R3 which I working on making work well with one open source database back in 2003 had ~100k open client cursors. This could easily entail hundreds of thousands of server side iterators. > Regarding the bps tree performance issue. I see nothing wrong about it. > We've found an issue and we'll surely fix it. There was no point to > think about such a minor optimization until we actually faced the > problem. My point is we should strive to write simple and reliable code > first, and optimize it only if there's a demand, otherwise we risk > turning the code into unmaintainable mess for no good reason. I agree with your point, I just disagree that this optimization is not practical. -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.io - www.twitter.com/kostja_osipov