Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id 11830781A6A for <~alpine/users@lists.alpinelinux.org>; Thu, 3 Dec 2020 03:28:48 +0000 (UTC) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dereferenced.org; s=default; t=1606966169; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O0UP+/JbDTpYqsXDEYF4p3QLr9w5tkbk/hBbZlZA2NY=; b=xDqFwsyr0fLzD5fUH338fU7zmjoXStVdq/kpvJDpOpDk0dOHeN/2bW7eGvJGFfd6GwtxJw Uw1NbU1wIbiGJTICEFPe2JgOyYlf4GVXtgT5E9QW0RghpMZdwn0aI3fWJCtGYBI2yoYL5a bpZgMA2D4AgaIoPGAD8A2hhGOb3MxRg= From: Ariadne Conill To: ~alpine/users@lists.alpinelinux.org Subject: Re: [LVM] Strange disk perf on fresh install Message-ID: <1620199.9KrzfI0oD8@nanabozho> In-Reply-To: <03b0aa41-a5c2-7a96-b8d2-2b8f4c80c1e0@cri.epita.fr> References: <03b0aa41-a5c2-7a96-b8d2-2b8f4c80c1e0@cri.epita.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: ariadne@dereferenced.org Date: Thu, 03 Dec 2020 03:29:29 GMT Hello, On Wednesday, December 2, 2020 11:21:30 AM MST Sevan wrote: > Hello everyone, > > I recently installed Alpine on a dedicated server using LVM for root and > swap partitions. But after some benchmarks, I noticed that the hard disk > speed of my new Alpine install was noticeably slower then on other > distro (Archinux and Debian in this case). > > I then ran more benchmarks using `fio`. Here is my methodology and the > benchs results: > > # Benchmark commands: > Read: > fio --name=alpine-read --ioengine=posixaio --rw=read --bs=4k > --numjobs=1 --size=4g --iodepth=1 --runtime=60 --time_based > --end_fsync=1 > Write: > fio --name=alpine-write --ioengine=posixaio --rw=write --bs=4k > --numjobs=1 --size=4g --iodepth=1 --runtime=60 --time_based > --end_fsync=1 > > # Benchmark setups: > > ## Server: > Hardware specs: > - GPT on a BIOS only capable motherboard with a `lvmsys` > Alpine install > - Hardware raid1 - HP SmartArray p222 > > Alpine - LVM: > READ: bw=154MiB/s (162MB/s) > WRITE: bw=86.3MiB/s (90.5MB/s) > > Archlinux - LVM (Alpine LVM partitions mounted on archlinux liveCD): > READ: bw=236MiB/s (247MB/s) > WRITE: bw=126MiB/s (132MB/s) > > ## VM (VirtualBox): > Hardware specs: > - Basic `lvmsys` Alpine install on a laptop with a NVMe SSD > > Alpine - LVM: > READ: bw=96.2MiB/s (101MB/s) > WRITE: bw=93.5MiB/s (98.0MB/s) > > Archlinux - LVM (Alpine LVM partitions mounted on archlinux liveCD): > READ: bw=354MiB/s (371MB/s) > WRITE: bw=237MiB/s (248MB/s) > > As you can see, Alpine performances are quite bad, is this an expected > behavior ? > > If it's not, where should I try to look for a fix ? Kernel config ? LVM > using musl ? Two things you may want to try. Make sure write cache is enabled: sdparm -s WCE=y /dev/sda (or whatever your RAID volume is). Secondly, Alpine uses mq-deadline scheduler by default on rotational media, this trades linear read/write performance for better seek latencies. You might try using kyber scheduler instead: echo kyber > /sys/block/sda/queue/ scheduler Ariadne