From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 14 19:22:41 2009 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 3350C1065690 for ; Wed, 14 Jan 2009 19:22:41 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.157]) by mx1.freebsd.org (Postfix) with ESMTP id B094F8FC18 for ; Wed, 14 Jan 2009 19:22:40 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so408420fgb.35 for ; Wed, 14 Jan 2009 11:22:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:to:subject:organization:from :original-sender:message-id:lines:user-agent:mime-version :content-type:date; bh=tNp290Fc5texKQLKtzU/Z/f8EtS8hwsu42WihWHcgWw=; b=MUhFfbmuoFOaf+q2n1Gf0rRsnTWADW9lg9UWatOqUTJgvpBh4QaKzuCAORBGrtgzof JZGrie1lV22SSxd7YDl+jlmQ+Bi1mNXDU5i4ZZ+EKCzpx+CtHxh/OljUoUPnNF3TLNhs 7xGPw7jcRP5loDhGeN5s/hpRwqKJujo+kdvVA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=to:subject:organization:from:original-sender:message-id:lines :user-agent:mime-version:content-type:date; b=wJMjNs1dq07vmdDWJEH9VYxpBA8bHwChX6zga9Ux2S/zrKbxIQae2nz/t11JHrqYRI FYW+ETfmu8cERLSjOCUVXOFxxqE8cq0oglnyvK0i9qgqKBuYH8RWDuYjMMSZgZ8t+nF6 L1CiMb+EYmtztfJZ03Wp1CFy0pjZWjL2rG2wo= Received: by 10.86.53.8 with SMTP id b8mr869599fga.58.1231959137194; Wed, 14 Jan 2009 10:52:17 -0800 (PST) Received: from localhost ([195.69.244.128]) by mx.google.com with ESMTPS id 12sm40352956fgg.26.2009.01.14.10.52.09 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 14 Jan 2009 10:52:16 -0800 (PST) To: freebsd-hackers@freebsd.org Organization: TOA Ukraine From: Mikolaj Golub Original-Sender: Mikolaj Golub Message-ID: <86iqohoh4b.fsf@kopusha.onet> Lines: 33 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 14 Jan 2009 10:52:16 -0800 (PST) Subject: How to calculate current kmem usage? 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: Wed, 14 Jan 2009 19:22:43 -0000 Hi, Could someone explain please, how to calculate current kernel memory utilization, one that is limited by vm.kmem_size? There is a script on http://wiki.freebsd.org/ZFSTuningGuide that calculates kernel memory utilization by summing the values from `kldstat' output (TEXT) and the values from `vmstat -m' output (DATA). Are these the only data needed for proper calculation of kmem? What about zone(9) allocations? Shouldn't data from `vmstat -z' output be added to calculate kmem usage? The reason I am asking about this is that we are tuning vfs.ufs.dirhash_maxmem on our storage servers. By default it is 2Mb that looks like very small value. We increased it to 30Mb and all 30Mb were filled very quickly, so we are considering to increase it more but we need the method to monitor the system resources we can hit (we use the default value for vm.kmem_size 300Mb that is not so large). So what the system parameters we should monitor increasing vfs.ufs.dirhash_maxmem? I see the growth of dirhash_maxmem corresponds the growth of wired memory. Currently wired is 222M on this host. Isn't wired memory limited by vm.kmem_size or it is limited only by vm.kvm_size? BTW, how reasonably large the value of vfs.ufs.dirhash_maxmem can be? I have seen recommendations to increase it until it all in usage, but may be there are other considerations I should take into account? We use rsync on our storage servers to synchronize data between the hosts and I suppose this is the main dirhash_mem eater. -- Mikolaj Golub