From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 5E52162D61 for ; Fri, 18 Sep 2020 14:36:29 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 4F49916196 for ; Fri, 18 Sep 2020 14:35:59 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 6326D1618C for ; Fri, 18 Sep 2020 14:35:58 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 253BD45428 for ; Fri, 18 Sep 2020 14:35:58 +0200 (CEST) To: Proxmox VE development discussion , =?UTF-8?Q?Fabian_Gr=c3=bcnbichler?= References: <20200917111658.1358831-1-f.gruenbichler@proxmox.com> <27b2c399-41fb-6e0e-fa27-2fb05a31adf2@proxmox.com> <1600412785.57pvbm8v64.astroid@nora.none> From: Thomas Lamprecht Message-ID: <1378deed-ac39-6db8-7eac-66cd681bdb6f@proxmox.com> Date: Fri, 18 Sep 2020 14:35:55 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:81.0) Gecko/20100101 Thunderbird/81.0 MIME-Version: 1.0 In-Reply-To: <1600412785.57pvbm8v64.astroid@nora.none> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.193 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment NICE_REPLY_A -0.001 Looks like a legit reply (A) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [perl.org] Subject: Re: [pve-devel] [PATCH common] properly encode YAML via YAML::XS X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Sep 2020 12:36:29 -0000 On 9/18/20 9:13 AM, Fabian Grünbichler wrote: > On September 17, 2020 5:06 pm, Thomas Lamprecht wrote: >> Was this issued raised on the currently used module's upstream? >> Maybe we/they could fix it there too, helping more than just our use >> case. > > not raised, but given the docs/description I'd say chances are rather > slim: > > This module implements a subset of the YAML specification for use in > reading and writing CPAN metadata files like META.yml and MYMETA.yml. It > should not be used for any other general YAML parsing or generation > task. > > it's based on/derived from YAML::Tiny, which states: > > It only supports a very basic subset of the full YAML specification. > > Usage is targeted at files like Perl's META.yml, for which a small and > easily-embeddable module is extremely attractive. > > Features will only be added if they are human readable, and can be > written in a few lines of code. Please don't be offended if your request > is refused. Someone has to draw the line, and for YAML::Tiny that > someone is me. ah ok, thanks for pointing that out. >> >> >> That said, I have no real objection against using this XS binding of >> libyaml-0-2. >> btw. we get that already installed on ceph setups through the dependency >> chain: ceph-mgr -> python3-yaml -> libyaml-0-2 > > install size is also very small (xs+lib are ~200kb), memory overhead > probably quite a bit more? we could load it only in the code-path where > we render yaml ;) > Did some simple measurements of RSS from freshly restarted daemon/proxy workers without client requests yet (Daemon module bases on CLIHandler which includes CLIFormatter). I repeated them about 10 times and recorded min/max values: pvedaemon worker: before: max: 125072 min: 124968 after: max: 124500 min: 124316 pveproxy worker: before: max: 129184 min: 128816 after: max: 128536 min: 128420 This isn't probably to significant statistically, but it actually seems that using libyaml XS bindings saves RSS over the perl-modules CPAN one. This comes probably mostly from the fact that it uses XSLoader[0], which allows dynamic on-the-fly loading of libraries, so it is already only loaded once really used. [0]: https://perldoc.perl.org/XSLoader.html