Project

General

Profile

Bug #11575

ZFS test "largest_pool" should not run on low memory systems

Added by Joshua M. Clulow 6 months ago. Updated 6 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
zfs - Zettabyte File System
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:

Description

The functional/largest_pool/largest_pool_001_pos test creates a ZFS pool of size 2PB on top of a sparse zvol in a disk-backed test pool. As it happens, even importing this pool this requires a lot of kernel memory:

> ::kmausers
878772224 bytes for 107272 allocations with data size 8192:
         kmem_slab_alloc_impl+0x198
         kmem_slab_alloc+0x62
         kmem_cache_alloc+0x15b
         vmem_alloc+0x1ae
         segkmem_xalloc+0xf6
         segkmem_alloc_vn+0x3b
         segkmem_alloc+0x17
         vmem_xalloc+0x5cf
         vmem_alloc+0x190
         kmem_slab_create+0x7c
         kmem_slab_alloc+0x103
         kmem_cache_alloc+0x15b
         kmem_zalloc+0x47
         range_tree_create_impl+0x44
         range_tree_create+0xf
335642240 bytes for 524441 allocations with data size 640:
         kmem_cache_alloc_debug+0x2f4
         kmem_cache_alloc+0x18d
         kmem_zalloc+0x47
         range_tree_create_impl+0x44
         range_tree_create+0xf
         metaslab_sync_done+0x389
         metaslab_init+0x1fa
         vdev_metaslab_init+0xc3
         vdev_load+0x115
         vdev_load+0x49
         spa_ld_load_vdev_metadata+0xab
         spa_load_impl+0x145
         spa_load+0x41
         spa_load_best+0x6c
         spa_open_common+0x102
268488704 bytes for 131098 allocations with data size 2048:
         kmem_slab_alloc_impl+0x198
         kmem_slab_alloc+0x62
         kmem_cache_alloc+0x15b
         kmem_zalloc+0x47
         metaslab_init+0x63
         vdev_metaslab_init+0xc3
         vdev_load+0x115
         vdev_load+0x49
         spa_ld_load_vdev_metadata+0xab
         spa_load_impl+0x145
         spa_load+0x41
         spa_load_best+0x6c
         spa_open_common+0x102
         spa_get_stats+0x54
         zfs_ioc_pool_stats+0x30
...

This is ~1414MB of kernel memory, just for range trees and other metaslab data. Running this test presents serious problems for a system with less than about 8GB of RAM. We should skip running it altogether if there is less than 8GB physical memory in the machine.

History

#1

Updated by Joshua M. Clulow 6 months ago

It seems that we could check for at least 8GB of RAM and, failing that, bail out using, e.g., log_unsupported or log_noresult.

Also available in: Atom PDF