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.2 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 18280 invoked from network); 16 Jan 2022 15:35:22 -0000 Received: from 4ess.inri.net (216.126.196.42) by inbox.vuxu.org with ESMTPUTF8; 16 Jan 2022 15:35:22 -0000 Received: from mail-lf1-f41.google.com ([209.85.167.41]) by 4ess; Sun Jan 16 10:27:26 -0500 2022 Received: by mail-lf1-f41.google.com with SMTP id br17so48199640lfb.6 for <9front@9front.org>; Sun, 16 Jan 2022 07:27:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=24mGYNxsODop5n6ARNCTi/rE84xpVUy71SJlRevr6xE=; b=UBbUgFhxrpKeOk7tw29t7bQHWZsjVQWtF1P5kC/iDVoGsEVLg1nFI2i0zOgDoX/DxC yeIhA/F1WvyL4SeevPWfpWrhBKVdCj2Kz5mhKedCA+acluKmMKivdqnJhr8iy71sJq4M bbR8If1USIB8H/2rSXceQtCsy8qaiBdn7hjHhm2JdrP3Ed4Bkcc3PNu/7qnedw+/dYyR 0qxlSqiC7pAIH1RcHGGJN5HjWW3CBnijdPDP4DXoSfs4erl/FbWAXJiu2lkzijoVebzS EE2XrsfdvkD/E8d1q4NvxIDgsa4Oyup/3rSDMjZo6DU7gvyfmQLyg9gpbGEmrIYACq7L Y4Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=24mGYNxsODop5n6ARNCTi/rE84xpVUy71SJlRevr6xE=; b=vKSpquYgxRIEcMkTaNS22EA+2BQjkzMWWFKdRRmwrN9jGsxkMjv01KfFCIYX5ENN48 oxBm7KoWae3eVTfWNE1s41zYEJaPrWGbH0+ROExPY85dPO81UwsRgz37oZ4EyRl1X98C QyDofHhuq4jXa0RS6OjUt5i6E/5toJtbo3ou4OvflcNdq4RM0DvSEG4vF34sUEHs0uw6 eBln+WNtcfqiGEHczBaX/6CbFVWpyPukpgMgiPN0rdXFJkpWUOPBWy1EAffghGXtkvtX ZRjnOqS19Q+pC14jncDZPPkAewcXEMW0PHhi1p3t90YfDtXzWsAdQ6/HutB5kiUsrAyO sbQw== X-Gm-Message-State: AOAM5308Yr1Yi0HVgqp5Ak1x26TuYvcrnemGGKkQ8ORCarmtPaiWGFFx p5q+RbwyCrWg5u8dmp3iqaQk+y+zwhfBfhZ2SBXWpxcB9Js= X-Google-Smtp-Source: ABdhPJwHactsmRgQtDJJ1+INAT7t5Z0iEcibfpAaOQwWHR6QRRmNWnWqaeC2A+yNo1pCSSsn919J91S/t6A3+7XJ9lU= X-Received: by 2002:a05:6512:1148:: with SMTP id m8mr7998064lfg.424.1642346836288; Sun, 16 Jan 2022 07:27:16 -0800 (PST) MIME-Version: 1.0 From: Martijn Heil Date: Sun, 16 Jan 2022 16:27:04 +0100 Message-ID: To: 9front@9front.org Content-Type: text/plain; charset="UTF-8" List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: non-blocking rails hosting Subject: [9front] devfs performance Reply-To: 9front@9front.org Precedence: bulk Hello, Lately I've been playing around with devfs, doing block interleaving on two identical USB 3.0 HDD's. I was expecting to have a bit more throughput compared to using one of those disks, but when I measured read throughput of the block-interleaved virtual device with tput, the throughput was exactly the same as measured on a single disk. The read throughput of a single disk as measured with tput is about 60 MiB/s, so I don't think this would saturate the USB 3.0 SuperSpeed bus. Taking a look at /sys/src/9/port/devfs.c, and especially interio() at /sys/src/9/port/devfs.c:1134, it seems that the internal read and write operations to the files that make up the virtual device are done synchronously instead of asynchronously like I (perhaps naively) expected. As I understand it, it reads one block from the first file, and only when that block is done reading it starts reading a block from the other file, and so on. I think my interpretation here is correct, but I'm not that familiar with the kernel source, so is what I'm saying here indeed correct? It might be worthwhile to optimize this so that it reads asynchronously from the files that the virtual device is built from. Is this possible? And how could we achieve this? Thank you for your time Martijn Heil aka ninjoh