From owner-freebsd-current@FreeBSD.ORG Tue Mar 11 09:30:43 2008 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9707A106566C; Tue, 11 Mar 2008 09:30:43 +0000 (UTC) (envelope-from freebsdlists@bsdunix.ch) Received: from conversation.bsdunix.ch (ns1.bsdunix.ch [82.220.1.90]) by mx1.freebsd.org (Postfix) with ESMTP id 2A1328FC13; Tue, 11 Mar 2008 09:30:43 +0000 (UTC) (envelope-from freebsdlists@bsdunix.ch) Received: from localhost (localhost.bsdunix.ch [127.0.0.1]) by conversation.bsdunix.ch (Postfix) with ESMTP id CEB0E5E26; Tue, 11 Mar 2008 10:30:41 +0100 (CET) X-Virus-Scanned: by amavisd-new at mail.bsdunix.ch Received: from conversation.bsdunix.ch ([127.0.0.1]) by localhost (conversation.bsdunix.ch [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 6e7CLWF7LH+j; Tue, 11 Mar 2008 10:30:39 +0100 (CET) Received: from [192.168.1.105] (home.bsdunix.ch [82.220.17.23]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by conversation.bsdunix.ch (Postfix) with ESMTP id 81CF95E22; Tue, 11 Mar 2008 10:30:39 +0100 (CET) Message-Id: From: Thomas Vogt To: Kris Kennaway In-Reply-To: <47D5D2B2.90202@FreeBSD.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Tue, 11 Mar 2008 10:30:39 +0100 References: <47D544B1.6070806@bsdunix.ch> <47D5D2B2.90202@FreeBSD.org> X-Mailer: Apple Mail (2.919.2) Cc: freebsd-fs@FreeBSD.org, current@freebsd.org Subject: Re: vm_thread_new: kstack allocation failed with many ZFS FS and NFSD X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Mar 2008 09:30:43 -0000 Hi Kris Am 11.03.2008 um 01:30 schrieb Kris Kennaway: > Thomas Vogt wrote: >> Hi List(s) >> I try to simulate real workload for our environment in my lab. The >> idea >> was to create 10k+ ZFS fs with several thousand files on each fs and >> then measure daily workload performance. Maybe 10k fs sounds silly >> but >> if you need individual quota for every user on a system, 5-10k fs are >> not unusual for ZFS >> My script to cerate zfs fs >> #!/bin/sh >> i=0; while [ $i != 10000 ]; do zfs create tank/script$i; i=`expr $i + >> 1`; done >> My script stopped after creating ~4850 FS with: >> vm_thread_new: kstack allocation failed >> vm_thread_new: kstack allocation failed >> vm_thread_new: kstack allocation failed >> vm_thread_new: kstack allocation failed >> vm_thread_new: kstack allocation failed >> vm_thread_new: kstack allocation failed > > Your kernel has run out of memory. If you cannot tune kmem_size > further then it cannot handle this many ZFS filesystems. Are there no limitation for vm.kmem_size* sysctls? I tried to increase vm.kmem_size* with larger values than 1500M but the system paniced in the boot process. Mark Tinguely told me maybe i can edit sys/amd64/include/pmap.h and change the line: - #define KPDPI (NPDPEPG-2) /* kernbase at -2GB */ + #define KPDPI (NPDPEPG-4) /* kernbase at -4GB */ I will try this. Any idea if this is save? Regards, Thomas