From owner-freebsd-questions@freebsd.org Wed Nov 21 05:14:28 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D66AE110517A for ; Wed, 21 Nov 2018 05:14:28 +0000 (UTC) (envelope-from matthias@petermann-it.de) Received: from mail.d2ux.org (d2ux.org [148.251.193.221]) by mx1.freebsd.org (Postfix) with ESMTP id 362BA6F26B for ; Wed, 21 Nov 2018 05:14:28 +0000 (UTC) (envelope-from matthias@petermann-it.de) Received: from mail (unknown [10.0.0.3]) by mail.d2ux.org (Postfix) with ESMTP id 4F5ED68454 for ; Wed, 21 Nov 2018 06:14:27 +0100 (CET) X-Virus-Scanned: amavisd-new at petermann-it.de Received: from mail.d2ux.org ([10.0.0.3]) by mail (new.petermann-it.de [10.0.0.3]) (amavisd-new, port 10024) with ESMTP id XT8sNK0YOA39 for ; Wed, 21 Nov 2018 06:14:26 +0100 (CET) Received: from [192.168.2.134] (p57B9DA90.dip0.t-ipconnect.de [87.185.218.144]) by mail.d2ux.org (Postfix) with ESMTPSA id 859E66844A for ; Wed, 21 Nov 2018 06:14:26 +0100 (CET) To: freebsd-questions From: Matthias Petermann Subject: Performance considerations on vnode backed memory disks (throughput) Message-ID: <7394023e-d761-7264-84b7-bcf6f7c8e18f@petermann-it.de> Date: Wed, 21 Nov 2018 06:13:49 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 362BA6F26B X-Spamd-Result: default: False [-4.24 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:148.251.193.221/32]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; DMARC_NA(0.00)[petermann-it.de]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; RCVD_COUNT_THREE(0.00)[4]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: mail.petermann-it.de]; NEURAL_HAM_SHORT(-0.97)[-0.965,0]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; IP_SCORE(-1.07)[ipnet: 148.251.0.0/16(-2.47), asn: 24940(-2.86), country: DE(-0.01)]; ASN(0.00)[asn:24940, ipnet:148.251.0.0/16, country:DE]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Nov 2018 05:14:29 -0000 Hello everybody, Yesterday I made an attempt and wondered a lot about the result. 1) Given is a system with two physical disks: The first disk is the system disk partitioned with GPT and formatted with UFS SU + J. The second disk is the data disk, also partitioned with GPT and formatted with UFS SU + J. Both partitions are about 1 GB in size. If I transfer a large file from the system disk to the data disk in this constellation, I get a throughput of 80 MB / s. 2) Then I extended the setup so that a memory disk is created and mounted on the data partition: root @ nas: / data # truncate -s 128G /data/vol1.img root @ nas: / data # mdconfig -a -t vnode -f /data/vol1.img md1 root @ nas: / data # newfs -U /dev /md1 root @ nas: / data # mount /dev/md1 /mnt If I transfer a large file from the system disk to the memory disk on the data disk in this constellation, I get a throughput of 20 MB / s. I am well aware that there must be an overhead. That this is so massive, however, surprised me. Which optimization options are available here? I would like to stay with sparse files. I would be very happy about some ideas or discussions on this topic. Best regards, Matthias -- Matthias Petermann | www.petermann-it.de GnuPG: 0x5C3E6D75 | 5930 86EF 7965 2BBA 6572 C3D7 7B1D A3C3 5C3E 6D75