Project

General

Profile

Actions

Bug #8558

closed

lwp_create() returns EAGAIN on system with more than 80K ZFS filesystems

Added by Prakash Surya over 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
zfs - Zettabyte File System
Start date:
2017-08-03
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
External Bug:

Description

On a system with more than 80K ZFS filesystems, we've seen cases where
lwp_create() will start to fail by returning EAGAIN. The problem being,
for each of those 80K ZFS filesystems, a taskq will be created for each
dataset as part of the ZIL for each dataset.

For each of these taskq's, a kernel thread will be created which results
in 24KB being allocated for each thread. With enough of these 24KB
allocations, we eventually exhaust the memory region set aside for these
allocations. Currently, segkpsize is set to a value of 2GB, which means
we can only support about 80K filesystems; 2GB / 24KB = ~80K.

The lwp_create() failure comes into play due to the fact that LWP
creation also allocates 24KB from this same region of memory. Thus, if
we've exhausted this region of memory due to the number of ZIL taskq's,
there won't be any memory avaible to allow the call to lwp_create() to
succeed.

Actions #1

Updated by Prakash Surya over 6 years ago

  • Subject changed from lwb_create() returns EAGAIN on system with more than 80K ZFS filesystems to lwp_create() returns EAGAIN on system with more than 80K ZFS filesystems
Actions #2

Updated by Prakash Surya over 6 years ago

  • Description updated (diff)
Actions #3

Updated by Electric Monk over 6 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 216d7723a1a58124cf95c4950d51d5f99d3f4128

commit  216d7723a1a58124cf95c4950d51d5f99d3f4128
Author: Prakash Surya <prakash.surya@delphix.com>
Date:   2017-08-31T05:29:47.000Z

    8558 lwp_create() returns EAGAIN on system with more than 80K ZFS filesystems
    Reviewed by: George Wilson <george.wilson@delphix.com>
    Reviewed by: Sebastien Roy <sebastien.roy@delphix.com>
    Approved by: Robert Mustacchi <rm@joyent.com>

Actions

Also available in: Atom PDF