MFV r272496:
Add tunable for number of metaslabs per vdev (vfs.zfs.vdev.metaslabs_per_vdev). The default remains at 200. Illumos issue: 5161 add tunable for number of metaslabs per vdev MFC after: 2 weeks
This commit is contained in:
commit
523b4c7fdf
@ -155,6 +155,15 @@ static vdev_ops_t *vdev_ops_table[] = {
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* When a vdev is added, it will be divided into approximately (but no
|
||||
* more than) this number of metaslabs.
|
||||
*/
|
||||
int metaslabs_per_vdev = 200;
|
||||
SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, metaslabs_per_vdev, CTLFLAG_RDTUN,
|
||||
&metaslabs_per_vdev, 0,
|
||||
"When a vdev is added, how many metaslabs the vdev should be divided into");
|
||||
|
||||
/*
|
||||
* Given a vdev type, return the appropriate ops vector.
|
||||
*/
|
||||
@ -1663,9 +1672,9 @@ void
|
||||
vdev_metaslab_set_size(vdev_t *vd)
|
||||
{
|
||||
/*
|
||||
* Aim for roughly 200 metaslabs per vdev.
|
||||
* Aim for roughly metaslabs_per_vdev (default 200) metaslabs per vdev.
|
||||
*/
|
||||
vd->vdev_ms_shift = highbit64(vd->vdev_asize / 200);
|
||||
vd->vdev_ms_shift = highbit64(vd->vdev_asize / metaslabs_per_vdev);
|
||||
vd->vdev_ms_shift = MAX(vd->vdev_ms_shift, SPA_MAXBLOCKSHIFT);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user