From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 3 23:21:27 2008 Return-Path: Delivered-To: FreeBSD-Hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00AFF16A418 for ; Thu, 3 Jan 2008 23:21:27 +0000 (UTC) (envelope-from Danovitsch@vitsch.net) Received: from VM01.Vitsch.net (vm01.vitsch.net [85.17.51.140]) by mx1.freebsd.org (Postfix) with ESMTP id 97D3D13C478 for ; Thu, 3 Jan 2008 23:21:26 +0000 (UTC) (envelope-from Danovitsch@vitsch.net) Received: from [192.168.45.230] (dhcp-077-250-050-082.chello.nl [77.250.50.82]) (authenticated bits=0) by VM01.Vitsch.net (8.13.8/8.13.8) with ESMTP id m03MrVta099251 for ; Thu, 3 Jan 2008 23:53:32 +0100 (CET) (envelope-from Danovitsch@vitsch.net) From: "Daan Vreeken [PA4DAN]" Organization: Vitsch Electronics To: FreeBSD-Hackers@FreeBSD.org Date: Thu, 3 Jan 2008 23:52:56 +0100 User-Agent: KMail/1.9.7 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801032352.56491.Danovitsch@vitsch.net> Cc: Subject: mksnap_ffs time X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 23:21:27 -0000 Hi Hackers, I'm running a 6.2-RELEASE server with a /home partition that's used to backup a customer's data. The backups are being made during the night. Since a couple of weeks I'm running mksnap_ffs daily to create filesystem snapshots of the data. I've been logging the time it takes mksnap_ffs to create it's snapshot. Here are the 'time' numbers for the last 11 days : 1696.25 real 0.00 user 16.55 sys 1884.09 real 0.00 user 18.63 sys 2038.50 real 0.00 user 20.72 sys 2354.69 real 0.00 user 25.07 sys 2202.43 real 0.00 user 23.08 sys 2621.88 real 0.00 user 27.46 sys 2791.46 real 0.00 user 29.57 sys 2845.48 real 0.00 user 31.69 sys 2894.24 real 0.00 user 32.60 sys 3085.37 real 0.00 user 35.62 sys 3253.11 real 0.00 user 37.25 sys Right now the filesystem contains 'just' 16 snapshots. The filesystem itself is a 700GB partition : # df Filesystem 1K-blocks Used Avail Capacity Mounted on ... /dev/twed0s3d 700905640 271350848 373482342 42% /home The filesystem has been created with default newfs flags. Today the filesystem contains 186615 files. Average file size is about 140 to 150KB. The data consists of lots of very small files, lots of middle-sized files, and a bunch of huge files, so 'average' file size might not be a very good measure. Every day between 300 to 400MB of data is changed/added. The time it takes to take another snapshot seems to increase with about 140 seconds a day. If the snapshot time keeps increasing in this fashion, the server will spend half of it's time in a day creating snapshots by the end of the year ;-) 1) Is anyone else seeing this? 2) Is there anything that can be done to improve snapshot creation time? 3) Is this something that has already been improved in version X of FreeBSD? And just for my own curiosity: Where does mksnap_ffs spend most of it's time? Is this something that simply can't be changed by the nature of UFS, or is it a known deficiency in the code that could by improved somehow? (btw: I can provide more information on the hardware or the filesystem (file size histograms anyone?) if anyone is interested.) Thanks for any insights, -- Daan