| Deutsch English Français Italiano |
|
<lqau7sF8btnU4@mid.individual.net> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.mixmin.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: vallor <vallor@cultnix.org> Newsgroups: comp.os.linux.misc Subject: Re: Named pipes vs. Unix sockets Date: 22 Nov 2024 08:38:20 GMT Lines: 21 Message-ID: <lqau7sF8btnU4@mid.individual.net> References: <Sp-cnSz8UupYQaf6nZ2dnZfqnPednZ2d@earthlink.com> <vhf5ts$16rpr$1@dont-email.me> <vhfjtj$19ijm$1@dont-email.me> <vhja6j$23f5e$4@dont-email.me> <vhmm4c$hnbj$1@dont-email.me> <vhmn2t$hv8i$3@dont-email.me> <vhnikj$me7m$1@dont-email.me> <wwvcyio8m9p.fsf@LkoBDZeT.terraraq.uk> <vhorrb$t48o$1@dont-email.me> <vhosra$1171f$1@dont-email.me> <lqalg1F7fi9U2@mid.individual.net> <vhp8qi$12m83$2@dont-email.me> <lqaoknF8btnU2@mid.individual.net> <lqaq6cF8btnU3@mid.individual.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net xXIX7/ey5AeFEQ5xkMzPjwu+PKH6Q7PCHUB3iBgMEStVkYR0SO Cancel-Lock: sha1:mtVJzFO50qoLkEMMRnHrsnVZdSw= sha256:wxNjz0Hyez0RiUR+YygPXRUnwo/b34DiYFNFSjU/HJY= X-Face: +McU)#<-H?9lTb(Th!zR`EpVrp<0)1p5CmPu.kOscy8LRp_\u`:tW;dxPo./(fCl CaKku`)]}.V/"6rISCIDP` User-Agent: Pan/0.161 (Hmm2; be402cc9; Linux-6.12.0) Bytes: 2187 On 22 Nov 2024 07:29:16 GMT, vallor <vallor@cultnix.org> wrote in <lqaq6cF8btnU3@mid.individual.net>: > However, the speed appears to be limited by dd in my examples -- setting > a block size to fill the pipe/packets seems to increase throughput: > > $ nc -l -U -N /tmp/socket > /dev/null & time -p ( dd if=/dev/zero > count=$[1024*1024*4] bs=1024 | nc -U -N /tmp/socket > /dev/null ) Realized the bottleneck would be the pipe between dd and nc, so wrote a program to connect to /tmp/socket and spew data at it -- it sends 46950 212992-byte buffers (9999974400 bytes) in 2.41 seconds. (4149366971 bytes/second, or 4.1GB/s). (The default "MTU" for a Linux Unix socket connection is 212992 bytes. Default pipe size is 8*512 bytes.) -- -v System76 Thelio Mega v1.1 x86_64 NVIDIA RTX 3090 Ti OS: Linux 6.12.0 Release: Mint 21.3 Mem: 258G "Profanity is the one language all programmers know best."