Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Mar 2008 11:28:53 +0100
From:      Kris Kennaway <kris@FreeBSD.org>
To:        Thomas Vogt <freebsdlists@bsdunix.ch>
Cc:        freebsd-fs@FreeBSD.org, current@freebsd.org
Subject:   Re: vm_thread_new: kstack allocation failed with many ZFS FS and NFSD
Message-ID:  <47D65EE5.902@FreeBSD.org>
In-Reply-To: <EEB46FCB-A244-4204-82F2-5CB37448F6E7@bsdunix.ch>
References:  <47D544B1.6070806@bsdunix.ch> <47D5D2B2.90202@FreeBSD.org> <EEB46FCB-A244-4204-82F2-5CB37448F6E7@bsdunix.ch>

next in thread | previous in thread | raw e-mail | index | archive | help
Thomas Vogt wrote:
> 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.

Yes, there is an upper bound somewhere around this point with the 
default kernel layout.

> 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?

I don't know, sorry.

Kris




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47D65EE5.902>