Return-Path: X-Original-To: apmail-cloudstack-dev-archive@www.apache.org Delivered-To: apmail-cloudstack-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6BD90105DB for ; Sat, 1 Feb 2014 07:19:11 +0000 (UTC) Received: (qmail 29741 invoked by uid 500); 1 Feb 2014 07:19:09 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 29481 invoked by uid 500); 1 Feb 2014 07:19:08 -0000 Mailing-List: contact dev-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list dev@cloudstack.apache.org Received: (qmail 29465 invoked by uid 99); 1 Feb 2014 07:19:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Feb 2014 07:19:08 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [209.85.219.54] (HELO mail-oa0-f54.google.com) (209.85.219.54) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Feb 2014 07:19:03 +0000 Received: by mail-oa0-f54.google.com with SMTP id i4so6250512oah.41 for ; Fri, 31 Jan 2014 23:18:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:content-type; bh=5G2EnOet4Nth8KBkqlFcJeKXqapY15OxglefuTuSbM8=; b=H1bR6JXnjiS/8s6ypBTcYYywF4/VgJGGScFAQtIKeurpme2KPX8LP8yWpDT/rbv6PG 4mAkJ5OQryBtTMAJp1xae6T9NRpUJNYlFnqGDvymT6MRgBnkHzMDTDD1QFsqoa+Xmxyv 83ncB7o8SUq5FmP7NA53y6Prukm3aG3uoeg06zej6WieEwual5IbviNrvwSjppYe7uox y4ILefeap7ZFGjL03BAh0DKtcGb3IEm0vDtsZDaAmA8K8GwEGma6VjUnDiMlwJojNdLx qzjklN5+0HneIg00FgLJnzH2SLreqnhHOjjztNk3FDlwK4UsYVqwUnljsKXuI/hqcisZ /moA== X-Gm-Message-State: ALoCoQk0N8eGO4mGaiWDsMlw+SiOMrhP/DBZdnQsatUIgQm6XjQ+6xA6Dwi3O9eaRUxWqrIg1tdA X-Received: by 10.182.4.232 with SMTP id n8mr20150797obn.34.1391239122357; Fri, 31 Jan 2014 23:18:42 -0800 (PST) MIME-Version: 1.0 Sender: ynojima@ynojima.net Received: by 10.76.97.179 with HTTP; Fri, 31 Jan 2014 23:18:22 -0800 (PST) X-Originating-IP: [198.172.18.17] In-Reply-To: References: From: Yoshikazu Nojima Date: Sat, 1 Feb 2014 00:18:22 -0700 X-Google-Sender-Auth: 3_6ammI3PeRqE5eDUexXRGg0LTA Message-ID: Subject: Re: [RFC] adding volume provisioning method option To: "dev@cloudstack.apache.org" Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Oh, thank you for information. I will look into. 2014-02-01 Marcus : > Oh yes, and storage overprovisioning doesn't currently work for KVM > storage types, but it's a relatively simple fix: > > https://issues.apache.org/jira/browse/CLOUDSTACK-5806 > > On Sat, Feb 1, 2014 at 12:12 AM, Marcus wrote: >> I don't think you'd have to change anything. Cloudstack (at least for >> accounting purposes) considers all storage 'fat' and calculates >> capacity per the disk offering size compared to total size of the >> primary pool. Then you can add an overprovisioning factor to fit your >> needs in the config options. >> >> On Sat, Feb 1, 2014 at 12:01 AM, Yoshikazu Nojima wrote: >>> Yes, preallocation=metadata creates a large file full of holes. and >>> maybe I need to modify storage consumption measuring method of >>> CloudStack to care this kind sparse file. >>> >>> To satisfy my needs, just turning on preallocation=metadata by default >>> or making it configurable from agent.properties is enough, but I'm >>> still thinking about making it configurable from disk offerings. >>> >>> Thanks, >>> >>> 2014-01-31 Marcus : >>>> Ok, so not technically sparse in the sense that you have a large file >>>> full of holes, but it's still not allocating the entire disk upfront. >>>> You get the same result of disk savings either way, existing >>>> cloudstack installs with qcow2 are still saving space in the same >>>> manner. >>>> >>>> On Fri, Jan 31, 2014 at 11:43 PM, Marcus wrote: >>>>> Here are my tests, using stock centos 6.5 qemu-img: >>>>> >>>>> [root@server ~]# qemu-img create -f qcow2 image.qcow2 10G >>>>> Formatting 'image.qcow2', fmt=qcow2 size=10737418240 encryption=off >>>>> cluster_size=65536 >>>>> [root@server ~]# qemu-img info image.qcow2 >>>>> image: image.qcow2 >>>>> file format: qcow2 >>>>> virtual size: 10G (10737418240 bytes) >>>>> disk size: 136K >>>>> cluster_size: 65536 >>>>> >>>>> No options leaves the disk as 136K, it's sparse. >>>>> >>>>> [root@server ~]# qemu-img create -f qcow2 -o preallocation=metadata >>>>> imagepre.qcow2 10G >>>>> Formatting 'imagepre.qcow2', fmt=qcow2 size=10737418240 encryption=off >>>>> cluster_size=65536 preallocation='metadata' >>>>> [root@server ~]# qemu info imagepre.qcow2 >>>>> -bash: qemu: command not found >>>>> [root@server ~]# qemu-img info imagepre.qcow2 >>>>> image: imagepre.qcow2 >>>>> file format: qcow2 >>>>> virtual size: 10G (10737418240 bytes) >>>>> disk size: 1.7M >>>>> cluster_size: 65536 >>>>> >>>>> preallocation=metadata leaves disk as 1.7M, it's also sparse, but a bit bigger. >>>>> >>>>> On Fri, Jan 31, 2014 at 11:41 PM, Marcus wrote: >>>>>> Yes, no_option.img is only 256k in size. it's sparse. >>>>>> >>>>>> On Fri, Jan 31, 2014 at 11:38 PM, Yoshikazu Nojima wrote: >>>>>>>>I don't think preallocation=metadata is required for sparse qcow2. >>>>>>>>Just if you want it to NOT be sparse for metadata. >>>>>>> >>>>>>> I think it is required. Please see the output below. Only >>>>>>> "metadata.img" is a sparse file. >>>>>>> >>>>>>> ============== >>>>>>> [root@ut1-qmb-rd5c test]# qemu-img create -f qcow2 -o >>>>>>> preallocation=off off.img 3G >>>>>>> Formatting 'off.img', fmt=qcow2 size=3221225472 encryption=off >>>>>>> cluster_size=65536 preallocation='off' >>>>>>> [root@ut1-qmb-rd5c test]# qemu-img create -f qcow2 -o >>>>>>> preallocation=metadata metadata.img 3G >>>>>>> Formatting 'metadata.img', fmt=qcow2 size=3221225472 encryption=off >>>>>>> cluster_size=65536 preallocation='metadata' >>>>>>> [root@ut1-qmb-rd5c test]# qemu-img create -f qcow2 -o >>>>>>> preallocation=full full.img 3G >>>>>>> Formatting 'full.img', fmt=qcow2 size=3221225472 encryption=off >>>>>>> cluster_size=65536 preallocation='full' >>>>>>> [root@ut1-qmb-rd5c test]# qemu-img create -f qcow2 no_option.img 3G >>>>>>> Formatting 'no_option.img', fmt=qcow2 size=3221225472 encryption=off >>>>>>> cluster_size=65536 >>>>>>> [root@ut1-qmb-rd5c test]# ls -alhs >>>>>>> total 3.1G >>>>>>> 4.0K drwxr-xr-x 2 root root 4.0K Feb 1 06:29 . >>>>>>> 4.0K dr-xr-x---. 5 root root 4.0K Feb 1 06:19 .. >>>>>>> 3.1G -rw-r--r-- 1 root root 3.1G Feb 1 06:23 full.img >>>>>>> 592K -rw-r--r-- 1 root root 3.1G Feb 1 06:21 metadata.img >>>>>>> 136K -rw-r--r-- 1 root root 256K Feb 1 06:29 no_option.img >>>>>>> 136K -rw-r--r-- 1 root root 256K Feb 1 06:21 off.img >>>>>>> ============== >>>>>>> >>>>>>> >>>>>>>>I also remember hearing that either recent qemu-img has a decent >>>>>>>>preallocation by default now, or that performance has improved such >>>>>>>>that it doesn't matter. Will need to do some reading to remember, but >>>>>>>>I think I remember hearing it's not a big deal nowadays. >>>>>>> >>>>>>> Ummm. I tested with "qemu-img version 0.12.1," and I confirmed the >>>>>>> performance of "preallocation=off" is worse than >>>>>>> "preallocation=metadata", >>>>>>> but it may be not true with latest qemu. I will test it. >>>>>>> >>>>>>> Thank you for your comment! >>>>>>> >>>>>>> Regards, >>>>>>> >>>>>>> >>>>>>> 2014-01-31 Marcus : >>>>>>>> I don't think preallocation=metadata is required for sparse qcow2. >>>>>>>> Just if you want it to NOT be sparse for metadata. >>>>>>>> >>>>>>>> I also remember hearing that either recent qemu-img has a decent >>>>>>>> preallocation by default now, or that performance has improved such >>>>>>>> that it doesn't matter. Will need to do some reading to remember, but >>>>>>>> I think I remember hearing it's not a big deal nowadays. >>>>>>>> >>>>>>>> On Fri, Jan 31, 2014 at 10:04 PM, Yoshikazu Nojima wrote: >>>>>>>>> Hello Nux, >>>>>>>>> >>>>>>>>> Thank you for your comment. I will prepare feature specification. >>>>>>>>> >>>>>>>>> Regards, >>>>>>>>> >>>>>>>>> 2014-01-31 Nux! : >>>>>>>>>> On 31.01.2014 20:24, Yoshikazu Nojima wrote: >>>>>>>>>>> >>>>>>>>>>> Afternoon All, >>>>>>>>>>> >>>>>>>>>>> Is there anyone working on adding volume provisioning method option? >>>>>>>>>>> As you know, thin provisioning of a volume save consumption of a >>>>>>>>>>> storage, and fat provisioning improves IOPS performance. >>>>>>>>>>> Especially, Qcow2 can save storage consumption and achive relatively >>>>>>>>>>> better performance than default by provisioning a volume with an >>>>>>>>>>> option "preallocation=metadata", which makes an image file a sparse >>>>>>>>>>> file. >>>>>>>>>>> >>>>>>>>>>> http://itscblog.tamu.edu/improve-disk-io-performance-in-kvm/#.232---preallocation >>>>>>>>>>> >>>>>>>>>>> Any thoughts about this? >>>>>>>>>>> If it is ok, I will write a feature specification on confluence and >>>>>>>>>>> start implementation. >>>>>>>>>>> >>>>>>>>>>> Regards, >>>>>>>>>>> Noji >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Yoshikazu Nojima >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Hello, >>>>>>>>>> >>>>>>>>>> I thought preallocation=metadata is common practice since years. Now I find >>>>>>>>>> out ACS doesn't actually use it? >>>>>>>>>> If so, this is really _bad_ and needs to be fixed ASAP... >>>>>>>>>> >>>>>>>>>> Thanks Noji >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> Sent from the Delta quadrant using Borg technology! >>>>>>>>>> >>>>>>>>>> Nux! >>>>>>>>>> www.nux.ro