From owner-freebsd-fs@freebsd.org Wed Jul 20 18:45:04 2016 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C96BDB9F027 for ; Wed, 20 Jul 2016 18:45:04 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail-it0-x22c.google.com (mail-it0-x22c.google.com [IPv6:2607:f8b0:4001:c0b::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A05F11600 for ; Wed, 20 Jul 2016 18:45:04 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: by mail-it0-x22c.google.com with SMTP id j124so58830922ith.1 for ; Wed, 20 Jul 2016 11:45:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sippysoft-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:from:date:message-id:subject:to; bh=GFqgV3R4PU9nFTd64y5zQP/yrYegnfIA2UdsVvKILck=; b=bqIO7YgKlJSJGE5QEjdNleKiZfLE9d4czQrNw62olUbWe/HNQsa78FVHPzY446aj36 tdhqn9OztywXRBTMuoQxl4nOoLVqR/cpCXRo3Tix4FRZmNtAVeEaXSqrTMAOEJD5M9ns c5euhJCWpiaBRZOTKthMUyZIS4FbWBthQTlzK+FOBR1spckWi9y+ZzBo2TU7CcJOfzXG D5FH8bIvywTQoBfJsZHvJ4+ZweBILxZkagrTrdPkOA1XWZsOFR28wEyqeiVRb0ENfqu0 cN9adZN9SrFrGqeNH61aOcM/X5F0tPUfFNhV4u8s/+JNt6wgpvBPES+p8D+osr9UOZuQ pkvg== 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:from:date:message-id:subject :to; bh=GFqgV3R4PU9nFTd64y5zQP/yrYegnfIA2UdsVvKILck=; b=RwMFN7su+HRhIwNmTaJ1r1M3GdfACOIfiHxy0azxXAZGxio/tJ+FqoDF1JkRYOw/db vqBrTpuugsCpmOu7ZIFnkLPIdDhalzCFG+iQVv5b68AQxWjAICLXBmBO94exPJOfnvxQ H70WvPoQVZ9ZyYaPDJKyjJFBd8w25iw5yVgyI7RmGBl0ytQeXfMocn3VtPZolXcTkaor kd6gYCfx2P9zikRWD2LuupiSP056geLUDsxgdk/sLSq1v6tIZNIrE+8gnSZNEXJ7feBb ZvOYgXP9h7G2sbLOjzblRZUHMktl2NUd5EsegDONwzR+YAotuZc5DYyC18OBIumI/qpE TkeA== X-Gm-Message-State: ALyK8tKr9cAN/up34TcB+0By2aLtnNn3xAUWY3gAjab0waU/WlXgHdyvWFz2aQadxxm0dd43KGwjyM73SDG7YoDQ X-Received: by 10.36.90.79 with SMTP id v76mr10751202ita.16.1469040303936; Wed, 20 Jul 2016 11:45:03 -0700 (PDT) MIME-Version: 1.0 Sender: sobomax@sippysoft.com Received: by 10.36.13.139 with HTTP; Wed, 20 Jul 2016 11:45:03 -0700 (PDT) From: Maxim Sobolev Date: Wed, 20 Jul 2016 11:45:03 -0700 X-Google-Sender-Auth: MmCckIU4iDv7QsmUGyMM9qRO7H4 Message-ID: Subject: Optimizing UFS 1/2 for non-rotating / compressed storage To: Kirk McKusick , FreeBSD Filesystems Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jul 2016 18:45:04 -0000 Hi Kirk et al, Do you by any chance have some hints of what parameters we need to set in newfs to maximally fit the following criteria: 1. Minimize free space fragmentation, i.e. we start with huge array or zeroes, we want to end up with as few number of continuous zero areas as possible (i.e. minimize free space discontinuity). 2. Blocks that belong to the same file should be as continuous as possible "on disk". 3. Each individual file should preferably start at the block offset that is multiple of certain pre-defined power-of-two size from the start of partition, e.g. 64k, 128k etc. The file system in question is write-mostly. We create image from scratch every time and them populate with installworld + pkg add. Any free space is subsequently erased with dd if=/dev/zero of=/myfs/bigfile; rm /myfs/bigfile, unmounted and image is compressed. We also grossly over-provision space, i.e. 2GB UFS image is created, less than 1GB is used at the end. Any hints would be appreciated. Thanks! -Maxim