From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, T_SCC_BODY_TEXT_LINE,URIBL_CSS autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 5676 invoked from network); 4 Jun 2022 15:15:55 -0000 Received: from tb-ob0.topicbox.com (64.147.108.117) by inbox.vuxu.org with ESMTPUTF8; 4 Jun 2022 15:15:55 -0000 Received: from tb-mx0.topicbox.com (tb-mx0.nyi.icgroup.com [10.90.30.73]) by tb-ob0.topicbox.com (Postfix) with ESMTP id 5016D36DA5 for ; Sat, 4 Jun 2022 11:15:48 -0400 (EDT) (envelope-from bounce.mM40cecbefc1f455f5c2c25358.r522be890-2105-11eb-b15e-8d699134e1fa@9fans.bounce.topicbox.com) Received: by tb-mx0.topicbox.com (Postfix, from userid 1132) id 4B36824FDC1C; Sat, 4 Jun 2022 11:15:48 -0400 (EDT) ARC-Authentication-Results: i=2; topicbox.com; arc=pass; dkim=none (no signatures found); dmarc=pass policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=eigenstate.org; spf=pass smtp.mailfrom=ori@eigenstate.org smtp.helo=mimir.eigenstate.org; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=message-id:to:date:from:mime-version :content-type:content-transfer-encoding:list-help:list-id :list-post:list-subscribe:reply-to:subject:list-unsubscribe; s= sysmsg-1; t=1654355748; bh=JjCbzfUFoLXg7gjedWx9lDjqPNcdpdQexSJNH stTp04=; b=kaZFrMaYqhkpTIoV5l384fjULhXkOBmNIrywlIq9+pYHcLU8vKLMT vL8UbY6zvt0ol7QJe31s7V0W8vwAWOhDa0iMMDb68pFl4Odp2MR7siaJz01xupG4 NQM/h84yieA4rFPlgDLywVHryLB3vIGjem2R/YhgroqS3pILe0mRRM= ARC-Seal: i=2; a=rsa-sha256; cv=pass; d=topicbox.com; s=sysmsg-1; t= 1654355748; b=qb8YL05955Rq+BlRClz2PdI+FgmAtZH/m3sJF/g1zwp2RFikSD hH2/H828VA8d+4Iw3nZmOrKK8dfClan8WGe2CnEXdeTn8/IIR699wOpCb/AAkYQY hjUXBFWiLf9Wy8VWB3prUkEo1DSeFqM5KCni/+sfK3VZ1+B8ginTiWl4c= Authentication-Results: topicbox.com; arc=pass; dkim=none (no signatures found); dmarc=pass policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=eigenstate.org; spf=pass smtp.mailfrom=ori@eigenstate.org smtp.helo=mimir.eigenstate.org; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) X-Received-Authentication-Results: tb-mx0.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC Policy is not at enforcement); dkim=none (no signatures found); dmarc=pass policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=eigenstate.org; iprev=pass smtp.remote-ip=206.124.132.107 (mimir.eigenstate.org); spf=pass smtp.mailfrom=ori@eigenstate.org smtp.helo=mimir.eigenstate.org; x-aligned-from=pass (Address match); x-me-sender=none; x-ptr=pass smtp.helo=mimir.eigenstate.org policy.ptr=mimir.eigenstate.org; x-return-mx=pass header.domain=eigenstate.org policy.is_org=yes (MX Records found: mail.pikopiko.org,nokogiri.pikopiko.org,eigenstate.org,kusuri.pikopiko.org); x-return-mx=pass smtp.domain=eigenstate.org policy.is_org=yes (MX Records found: mail.pikopiko.org,nokogiri.pikopiko.org,eigenstate.org,kusuri.pikopiko.org); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=9fans.net; h=message-id :to:date:from:mime-version:content-type :content-transfer-encoding:list-help:list-id:list-post :list-subscribe:reply-to:subject:list-unsubscribe; s=dkim-1; t= 1654355748; x=1654442148; bh=GOE7Upz9yDKcE0k+1vqXCo/ySKzM2wh7N1R xgai6PhA=; b=EgS/jjVrUmGZ4L+bmOXIuAy0ZbNO41o18XAcAaN9UO9Fo44Goi4 Re8EXWRZ7JdwISRSZN7qqN1y0eH3tM91FQk/SOGHiKj08cDbCkuG1PxyRB01rM6I p8N/eE3R3AEaZgokxi3gOUP5Plbki8s05XAbMu41Ein4Rt+Yr+yNfI+c= Received: from tb-mx0.topicbox.com (localhost.local [127.0.0.1]) by tb-mx0.topicbox.com (Postfix) with ESMTP id 3A7BA24FD5CB for <9fans@9fans.net>; Sat, 4 Jun 2022 11:15:35 -0400 (EDT) (envelope-from ori@eigenstate.org) Received: from tb-mx0.topicbox.com (localhost [127.0.0.1]) by tb-mx0.topicbox.com (Authentication Milter) with ESMTP id 6FC105A5788; Sat, 4 Jun 2022 11:15:35 -0400 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1654355735; b=TWuEyu39h/eCLjHJUjBOtlaeVr6woyboMYq/LG3UEKf1eixDGp 9z4Dt0nCXEKWByWzqc83C8h20rR9ltW0J73p7AhbEod2gEOHmoBq093OKq6wgibo phy4FnNf11rZLrEeZ/eqZYS7izjLkBRlvnk62NucvLV7ItNfYtXP2aAskCOa3SEM OvV37MoVUJuTVYlnuVwP+dGJxYx1mAARsFPZ1sp+9n1F0dZxGv1Ez46oWQr93LBG csznTjVXSghzwsY7Iklzakdti663fg8aftxgjvHYytSz4DcEZ0JTUlIPO7rtLOtX BHSXDU5RYM23v3h60xWJhxt+6Cteok9cPs1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=message-id:to:subject:date:from:mime-version :content-type:content-transfer-encoding; s=arcseal; t= 1654355735; bh=rYM7WJZ9CZkcGovxeNmEXyi6furGoNbbXm+xsSTSrPk=; b=R F6OxzJ9/ClqAVTjsCjzFoLfFns5LHCPr0ePdiPLylf1COXtPD9HeZ8UONFQ8BYNB E/iO9v7LlylPRq/BqkHiujq84twwrZwM/h3S19ZRyGLVBkBOSwy3FPtO5m5/OeSZ mv3wfc4iXyQdJ8mV4QotxUiiJf1LEhiXGNUAySvkNi7pi/0OPALkCun3kYwEwI4z oaP+YY77FAJPSOmR9Ypfoe+WOnDdLCzmcgbasnNEF7olVeAAdYdSxb+A/Tu5r5k1 2xcFnqBaIhoJeMHzpP+Jc07u82Si0ilH+Cmhrr1+T6oD9b+aYxOypXRJMOHELoCN aqVyoNoZL2SQjMsi4hzxg== ARC-Authentication-Results: i=1; tb-mx0.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC Policy is not at enforcement); dkim=none (no signatures found); dmarc=pass policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=eigenstate.org; iprev=pass smtp.remote-ip=206.124.132.107 (mimir.eigenstate.org); spf=pass smtp.mailfrom=ori@eigenstate.org smtp.helo=mimir.eigenstate.org; x-aligned-from=pass (Address match); x-me-sender=none; x-ptr=pass smtp.helo=mimir.eigenstate.org policy.ptr=mimir.eigenstate.org; x-return-mx=pass header.domain=eigenstate.org policy.is_org=yes (MX Records found: mail.pikopiko.org,nokogiri.pikopiko.org,eigenstate.org,kusuri.pikopiko.org); x-return-mx=pass smtp.domain=eigenstate.org policy.is_org=yes (MX Records found: mail.pikopiko.org,nokogiri.pikopiko.org,eigenstate.org,kusuri.pikopiko.org); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 X-ME-VSCause: gggruggvucftvghtrhhoucdtuddrgedvfedrleekgdekjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhepkffvufffhf ggtgfgsehtjeejtddttddvnecuhfhrohhmpehorhhisegvihhgvghnshhtrghtvgdrohhr ghenucggtffrrghtthgvrhhnpeduueeljedthfekvdejueevkeeiffeivddtjeevleeufe ehhfethffhudejjeejueenucffohhmrghinhepmhgriiiiohdrlhhinecukfhppedvtdei rdduvdegrddufedvrddutdejpdejgedruddtkedrheeirddvvdehnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehinhgvthepvddtiedruddvgedrudefvddruddtjedp hhgvlhhopehmihhmihhrrdgvihhgvghnshhtrghtvgdrohhrghdpmhgrihhlfhhrohhmpe eoohhrihesvghighgvnhhsthgrthgvrdhorhhgqe X-ME-VSScore: 0 X-ME-VSCategory: clean Received-SPF: pass (eigenstate.org: 206.124.132.107 is authorized to use 'ori@eigenstate.org' in 'mfrom' identity (mechanism 'mx' matched)) receiver=tb-mx0.topicbox.com; identity=mailfrom; envelope-from="ori@eigenstate.org"; helo=mimir.eigenstate.org; client-ip=206.124.132.107 Received: from mimir.eigenstate.org (mimir.eigenstate.org [206.124.132.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tb-mx0.topicbox.com (Postfix) with ESMTPS for <9fans@9fans.net>; Sat, 4 Jun 2022 11:15:34 -0400 (EDT) (envelope-from ori@eigenstate.org) Received: from abbatoir.myfiosgateway.com (pool-74-108-56-225.nycmny.fios.verizon.net [74.108.56.225]) by mimir.eigenstate.org (OpenSMTPD) with ESMTPSA id 99cfe0ef (TLSv1.2:ECDHE-RSA-AES256-SHA:256:NO) for <9fans@9fans.net>; Sat, 4 Jun 2022 08:15:32 -0700 (PDT) Message-ID: <14C2F3A5573654C099879213DE65733F@eigenstate.org> To: 9fans@9fans.net Date: Sat, 04 Jun 2022 11:15:31 -0400 From: ori@eigenstate.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: 31b39c88-e419-11ec-b18b-eef6b3269551 Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UZDEzZDEyMGVjYTlkNWVlNy1NNDBjZWNiZWZjMWY0NTVmNWMyYzI1?= =?UTF-8?B?MzU4Pg==?= List-Help: List-Id: "9fans" <9fans.9fans.net> List-Post: List-Software: Topicbox v0 List-Subscribe: Precedence: list Reply-To: 9fans <9fans@9fans.net> Subject: [9fans] little pipe speedtest List-Unsubscribe: , Topicbox-Delivery-ID: 2:9fans:437d30aa-c441-11e9-8a57-d036212d11b0:522be890-2105-11eb-b15e-8d699134e1fa:M40cecbefc1f455f5c2c25358:1:y6CzzotY78ZVCEs8LoN0Aag_eYKowDZDtjEyfLM4vxw inspired by: https://mazzo.li/posts/fast-pipes.html I was curious to see how things stacked up on plan 9. The machines are apples to oranges (my 9front box is a 2015-ish era Zbox with a Intel Core i5-7300HQ processor, and my work machine is a Linux with a 12 core Ryzen 9 3900X). Transferring 128 gigs instead of the 10 in the initial benchmark, here are the results: =20=20=20=20=20=20=20=20 # 9front 595684fd8a2f08e12d5df48152d93fb8ab800fe3 amd64 % time rc -c '6.write | 6.read' 0.33u 23.28s 11.64r rc -c 6.write | 6.read=20 =20=20=20=20=20=20=20=20 # Linux 5.13.0-40-generic #45~20.04.1-Ubuntu SMP $ time sh -c './write | ./read' real 0m32.039s user 0m0.231s sys 0m34.576s here's the plan 9 version of the program: write.c: #include #include =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 void main(void) { usize sz; char* buf; =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 sz =3D 1 << 18; buf =3D malloc(sz); memset((void*)buf, 'X', sz); while(1){ n =3D write(1, buf, sz) !=3D sz) break; exits(nil); } read.c: #include #include =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 enum { KiB =3D 1024ULL, MiB =3D 1024*KiB, GiB =3D 1024*MiB, }; =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 void main(void) { vlong sz, r, n; char* buf; =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 r =3D 0; sz =3D 1 << 18; buf =3D malloc(sz); while(r <=3D 128ULL*GiB){ n =3D read(0, buf, sz); if(n <=3D 0) break; r +=3D n; } exits(nil); } And the linux version: write.c: #include #include #include =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 int main(int argc, char **argv) { size_t sz; char* buf; =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 sz =3D 1 << 18; buf =3D malloc(sz); memset(buf, 'X', sz); while(1) if(write(1, buf, sz) !=3D sz) break; =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 return 0; } read.c: #include #include =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 enum { KiB =3D 1024ULL, MiB =3D 1024*KiB, GiB =3D 1024*MiB, }; =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 int main(int argc, char **argv) { ssize_t sz, r, n; char* buf; =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 r =3D 0; sz =3D 1 << 18; buf =3D malloc(sz); while(r <=3D 128ULL*GiB){ n =3D read(0, buf, sz); if(n <=3D 0) break; r +=3D n; } return 0; } ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/Td13d120eca9d5ee7-M40cec= befc1f455f5c2c25358 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription