From owner-freebsd-current@FreeBSD.ORG Tue Mar 11 00: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 0AF9D106566C; Tue, 11 Mar 2008 00:30:43 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from weak.local (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 2DDC38FC20; Tue, 11 Mar 2008 00:30:41 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <47D5D2B2.90202@FreeBSD.org> Date: Tue, 11 Mar 2008 01:30:42 +0100 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: Thomas Vogt References: <47D544B1.6070806@bsdunix.ch> In-Reply-To: <47D544B1.6070806@bsdunix.ch> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 00:30:43 -0000 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. Kris