zfsonlinux/spl — pull request #337 by andrey-ve (2014-03-03 13:48:45+00:00)
Title: Tweak max/min objs per slab and max slab size

By default maximal number of objects in slab can't exceed (16*2 - 1) and slab
size can't exceed 32M.
Today's high end servers having couple hundreds of RAM available for ARC may
run into a trouble with virtual memory because of the restriction mentioned
above.

### Problem

Reasons for very high number of virtual memory allocations:
* Real slab size very small relative to the size of the entire RAM
* Slabs allocated on virtual memory and fill entire ARC

The result is very high number of allocated virtual memory ranges (hundreds of
ranges). When virtual memory subsystem manages high number of ranges its
performance become so poor that it freezes from time to time.

### Solution

Number of objects per slab should be increased taking into account maximal
slab size which can also be increased if needed.

### Tests on system having 192G ARC

#### Settings

512 - maximal number of object per slab
64 Mb - maximal slab size

#### Test

Run R/W IO ops for variable block sizes starting with 4k, multiplying block sizes by 2 for next iteration till 1M block size reached. For each block size 6TB of data was written to disk.

#### Results

Time to perform same sequence of R/W IO decreased by 26%.

Signed-off-by: Andrey Vesnovaty