Discussion:
spacemap_histogram
aurfalien via illumos-zfs
2014-09-10 14:20:30 UTC
Permalink
Hi,

I’ve asked on the FreeBSD lists but no takers.

Curious if any one has tried the spacemap_histogram feature in production.

Seems cool, in theory anyways.

Thanks in advance,

- aurf

"Janitorial Services"




-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/23047029-187a0c8d
Modify Your Subscription: https://www.listbox.com/member/?member_id=23047029&id_secret=23047029-2e85923f
Powered by Listbox: http://www.listbox.com
Richard Kojedzinszky via illumos-zfs
2014-09-10 14:28:35 UTC
Permalink
We have enabled it, though I dont know the actual benefits. At least, our
systems are stable as was before.

Regards,
Kojedzinszky Richard
Post by aurfalien via illumos-zfs
Hi,
I’ve asked on the FreeBSD lists but no takers.
Curious if any one has tried the spacemap_histogram feature in production.
Seems cool, in theory anyways.
Thanks in advance,
- aurf
"Janitorial Services"
illumos-zfs | Archives [deef8ca3.jpg?uri=aHR0cHM6Ly93d3cubGlzdGJveC5jb20vaW1hZ2VzL2ZlZWQtaWNvbi0xMHgxMC5qcGc] | Modify Your
Subscription
[deef8ca3.png?uri=aHR0cHM6Ly93d3cubGlzdGJveC5jb20vaW1hZ2VzL2xpc3Rib3gtbG9nby1zbWFsbC5wbmc]
aurfalien via illumos-zfs
2014-09-10 14:35:30 UTC
Permalink
Thanks Richard, appreciate reply.

How long have you had it in production and was it enabled on an already existing pool or a fresh one having no data in it?

And does your pool have compression enabled?

- aurf

"Janitorial Services"
We have enabled it, though I dont know the actual benefits. At least, our systems are stable as was before.
Regards,
Kojedzinszky Richard
Post by aurfalien via illumos-zfs
Hi,
I’ve asked on the FreeBSD lists but no takers.
Curious if any one has tried the spacemap_histogram feature in production.
Seems cool, in theory anyways.
Thanks in advance,
- aurf
"Janitorial Services"
illumos-zfs | Archives [deef8ca3.jpg?uri=aHR0cHM6Ly93d3cubGlzdGJveC5jb20vaW1hZ2VzL2ZlZWQtaWNvbi0xMHgxMC5qcGc] | Modify Your
Subscription
[deef8ca3.png?uri=aHR0cHM6Ly93d3cubGlzdGJveC5jb20vaW1hZ2VzL2xpc3Rib3gtbG9nby1zbWFsbC5wbmc]
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/23047029-187a0c8d
Modify Your Subscription: https://www.listbox.com/member/?member_id=23047029&id_secret=23047029-2e85923f
Powered by Listbox: http://www.listbox.com
Richard Kojedzinszky via illumos-zfs
2014-09-10 15:28:33 UTC
Permalink
This pool was an already an used pool, and we have enabled it around
February as I remember. And we have compression enabled on the pool. But
please note, we have small pools (8TB, 16TB) compared to ones mentioned in
these lists.

Kojedzinszky Richard
Post by aurfalien via illumos-zfs
Thanks Richard, appreciate reply.
How long have you had it in production and was it enabled on an already existing pool or a fresh one having no data in it?
And does your pool have compression enabled?
- aurf
"Janitorial Services"
We have enabled it, though I dont know the actual benefits. At least, our systems are stable as was before.
Regards,
Kojedzinszky Richard
Hi,
I’ve asked on the FreeBSD lists but no takers.
Curious if any one has tried the spacemap_histogram feature in production.
Seems cool, in theory anyways.
Thanks in advance,
- aurf
"Janitorial Services"
illumos-zfs | Archives [deef8ca3.jpg?uri=aHR0cHM6Ly93d3cubGlzdGJveC5jb20vaW1hZ2VzL2ZlZWQtaWNvbi0xMHgxMC5qcGc] | Modify Your
Subscription
[deef8ca3.png?uri=aHR0cHM6Ly93d3cubGlzdGJveC5jb20vaW1hZ2VzL2xpc3Rib3gtbG9nby1zbWFsbC5wbmc]
Steven Hartland via illumos-zfs
2014-09-10 14:36:17 UTC
Permalink
I've not used it I'm afraid as the man page provides no
real indication of what its benefit would be if used.

"This features allows ZFS to maintain more information
about how free space is organized within the pool.

Regards
Steve
----- Original Message -----
From: "aurfalien via illumos-zfs" <***@lists.illumos.org>
To: <***@lists.illumos.org>
Sent: Wednesday, September 10, 2014 3:20 PM
Subject: [zfs] spacemap_histogram


Hi,

I’ve asked on the FreeBSD lists but no takers.

Curious if any one has tried the spacemap_histogram feature in production.

Seems cool, in theory anyways.

Thanks in advance,

- aurf

"Janitorial Services"




-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/24401717-fdfe502b
Modify Your Subscription: https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
aurfalien via illumos-zfs
2014-09-10 14:42:38 UTC
Permalink
Hi Steven,

I gleaned this from an older Illumos post found here;

http://comments.gmane.org/gmane.os.illumos.zfs/2565

Of interest;
- There is a new spacemap_histogram on-disk feature flag. When it is
enabled spacemaps store more data about the amount of contiguous free
space in metaslabs. The current disk format only stores the total
amount of free space, which means that heavily fragmented metaslabs
can look appealing, causing us to read them off disk, even though they
don't have enough contiguous free space to satisfy large allocations,
leading us to continually load the same fragmented space maps over and
over again. The allocation algorithm that uses this information is
disabled by default and can be enabled via a tunable. It will become
the default allocator once George is satisfied with the amount of
performance testing it has received. We have extensively tested this
code both with the tunable enabled and disabled. It is not possible to
seperate out spacemap_histogram from the rest of this refactoring
because they were done together.



- aurf

"Janitorial Services"
Post by Steven Hartland via illumos-zfs
I've not used it I'm afraid as the man page provides no
real indication of what its benefit would be if used.
"This features allows ZFS to maintain more information
about how free space is organized within the pool.
Regards
Steve
Sent: Wednesday, September 10, 2014 3:20 PM
Subject: [zfs] spacemap_histogram
Hi,
I’ve asked on the FreeBSD lists but no takers.
Curious if any one has tried the spacemap_histogram feature in production.
Seems cool, in theory anyways.
Thanks in advance,
- aurf
"Janitorial Services"
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/24401717-fdfe502b
Modify Your Subscription: https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/23047029-187a0c8d
Modify Your Subscription: https://www.listbox.com/member/?member_id=23047029&id_secret=23047029-2e85923f
Powered by Listbox: http://www.listbox.com
aurfalien via illumos-zfs
2014-09-10 14:53:22 UTC
Permalink
By the way, any one know who George is?

I’d like to ping him and see if he is satisfied yet ? :)

- aurf

"Janitorial Services"
Post by aurfalien via illumos-zfs
Hi Steven,
I gleaned this from an older Illumos post found here;
http://comments.gmane.org/gmane.os.illumos.zfs/2565
Of interest;
- There is a new spacemap_histogram on-disk feature flag. When it is
enabled spacemaps store more data about the amount of contiguous free
space in metaslabs. The current disk format only stores the total
amount of free space, which means that heavily fragmented metaslabs
can look appealing, causing us to read them off disk, even though they
don't have enough contiguous free space to satisfy large allocations,
leading us to continually load the same fragmented space maps over and
over again. The allocation algorithm that uses this information is
disabled by default and can be enabled via a tunable. It will become
the default allocator once George is satisfied with the amount of
performance testing it has received. We have extensively tested this
code both with the tunable enabled and disabled. It is not possible to
seperate out spacemap_histogram from the rest of this refactoring
because they were done together.
- aurf
"Janitorial Services"
Post by Steven Hartland via illumos-zfs
I've not used it I'm afraid as the man page provides no
real indication of what its benefit would be if used.
"This features allows ZFS to maintain more information
about how free space is organized within the pool.
Regards
Steve
Sent: Wednesday, September 10, 2014 3:20 PM
Subject: [zfs] spacemap_histogram
Hi,
I’ve asked on the FreeBSD lists but no takers.
Curious if any one has tried the spacemap_histogram feature in production.
Seems cool, in theory anyways.
Thanks in advance,
- aurf
"Janitorial Services"
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/24401717-fdfe502b
Modify Your Subscription: https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/23047029-187a0c8d
Modify Your Subscription: https://www.listbox.com/member/?member_id=23047029&id_secret=23047029-2e85923f
Powered by Listbox: http://www.listbox.com
Michael Schuster via illumos-zfs
2014-09-10 15:00:06 UTC
Permalink
On Wed, Sep 10, 2014 at 4:53 PM, aurfalien via illumos-zfs <
Post by aurfalien via illumos-zfs
By the way, any one know who George is?
I'm fairly certain this will be George Wilson, one of the main engineers
working on ZFS at Sun, now at Delphix (according to Linkedin).

HTH
Michael
--
Michael Schuster
http://recursiveramblings.wordpress.com/



-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/23047029-187a0c8d
Modify Your Subscription: https://www.listbox.com/member/?member_id=23047029&id_secret=23047029-2e85923f
Powered by Listbox: http://www.listbox.com
George Wilson via illumos-zfs
2014-09-10 15:04:05 UTC
Permalink
The space_map histogram feature has been used in production at Delphix
for a while. The data it provide is being used to make smarter decisions
about how and where to allocate blocks. It also gives us an idea of how
badly fragmented things get on a pool. For example, we've come up with a
simplistic metric to define pool fragmentation based on the histogram
information. Here's an example:

NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
dcenter 8.22T 5.50T 2.71T - 53% 66% 1.00x ONLINE -

The higher the frag% the more your free space is comprised of small
segments. We have been making many changes in this area and more to come
but the idea behind the histogram was to be able to lay the foundation
for improvements in allocation strategies. You can take a closer look at
the histogram on your pool by running 'zdb -mm[m] <pool>'.

Hope this helps. I will try to get a more extensive write up in a blog
along with some of the perf enhancements we've seen by making smarter
allocations decisions. Unfortunately right now I'm pretty busy with
compressed ARC. If you have more questions please feel free to ask (post
or email directly).

Thanks,
George
Post by aurfalien via illumos-zfs
By the way, any one know who George is?
I’d like to ping him and see if he is satisfied yet ? :)
- aurf
"Janitorial Services"
Post by aurfalien via illumos-zfs
Hi Steven,
I gleaned this from an older Illumos post found here;
http://comments.gmane.org/gmane.os.illumos.zfs/2565
Of interest;
- There is a new spacemap_histogram on-disk feature flag. When it is
enabled spacemaps store more data about the amount of contiguous free
space in metaslabs. The current disk format only stores the total
amount of free space, which means that heavily fragmented metaslabs
can look appealing, causing us to read them off disk, even though they
don't have enough contiguous free space to satisfy large allocations,
leading us to continually load the same fragmented space maps over and
over again. The allocation algorithm that uses this information is
disabled by default and can be enabled via a tunable. It will become
the default allocator once George is satisfied with the amount of
performance testing it has received. We have extensively tested this
code both with the tunable enabled and disabled. It is not possible to
seperate out spacemap_histogram from the rest of this refactoring
because they were done together.
- aurf
"Janitorial Services"
Post by Steven Hartland via illumos-zfs
I've not used it I'm afraid as the man page provides no
real indication of what its benefit would be if used.
"This features allows ZFS to maintain more information
about how free space is organized within the pool.
Regards
Steve
----- Original Message ----- From: "aurfalien via illumos-zfs"
Sent: Wednesday, September 10, 2014 3:20 PM
Subject: [zfs] spacemap_histogram
Hi,
I’ve asked on the FreeBSD lists but no takers.
Curious if any one has tried the spacemap_histogram feature in production.
Seems cool, in theory anyways.
Thanks in advance,
- aurf
"Janitorial Services"
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
https://www.listbox.com/member/archive/rss/182191/24401717-fdfe502b
Modify Your Subscription: https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com <http://www.listbox.com/>
*illumos-zfs* | Archives
<https://www.listbox.com/member/archive/182191/=now>
<https://www.listbox.com/member/archive/rss/182191/22008002-303f2ff4>
| Modify
<https://www.listbox.com/member/?&>
Your Subscription [Powered by Listbox] <http://www.listbox.com>
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/23047029-187a0c8d
Modify Your Subscription: https://www.listbox.com/member/?member_id=23047029&id_secret=23047029-2e85923f
Powered by Listbox: http://www.listbox.com
aurfalien via illumos-zfs
2014-09-10 15:18:39 UTC
Permalink
Wow!

Thank you very much George, you are both a gentlemen and a scholar to an order of magnitude!

I assume it best to implement on fresh pools to see the most benefits?

My path will most limey be to replicate on a system with it enabled, then switch over to that system. I’ve 2 identical servers for one of our main production resources.


- aurf

"Janitorial Services"
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
dcenter 8.22T 5.50T 2.71T - 53% 66% 1.00x ONLINE -
The higher the frag% the more your free space is comprised of small segments. We have been making many changes in this area and more to come but the idea behind the histogram was to be able to lay the foundation for improvements in allocation strategies. You can take a closer look at the histogram on your pool by running 'zdb -mm[m] <pool>'.
Hope this helps. I will try to get a more extensive write up in a blog along with some of the perf enhancements we've seen by making smarter allocations decisions. Unfortunately right now I'm pretty busy with compressed ARC. If you have more questions please feel free to ask (post or email directly).
Thanks,
George
Post by aurfalien via illumos-zfs
By the way, any one know who George is?
I’d like to ping him and see if he is satisfied yet ? :)
- aurf
"Janitorial Services"
Post by aurfalien via illumos-zfs
Hi Steven,
I gleaned this from an older Illumos post found here;
http://comments.gmane.org/gmane.os.illumos.zfs/2565
Of interest;
- There is a new spacemap_histogram on-disk feature flag. When it is
enabled spacemaps store more data about the amount of contiguous free
space in metaslabs. The current disk format only stores the total
amount of free space, which means that heavily fragmented metaslabs
can look appealing, causing us to read them off disk, even though they
don't have enough contiguous free space to satisfy large allocations,
leading us to continually load the same fragmented space maps over and
over again. The allocation algorithm that uses this information is
disabled by default and can be enabled via a tunable. It will become
the default allocator once George is satisfied with the amount of
performance testing it has received. We have extensively tested this
code both with the t
unable enabled and disabled. It is not possible to
seperate out spacemap_histogram from the rest of this refactoring
because they were done together.
- aurf
"Janitorial Services"
Post by Steven Hartland via illumos-zfs
I've not used it I'm afraid as the man page provides no
real indication of what its benefit would be if used.
"This features allows ZFS to maintain more information
about how free space is organized within the pool.
Regards
Steve
Sent: Wednesday, September 10, 2014 3:20 PM
Subject: [zfs] spacemap_histogram
Hi,
I’ve asked on the FreeBSD lists but no takers.
Curious if any one has tried the spacemap_histogram feature in production.
Seems cool, in theory anyways.
Thanks in advance,
- aurf
"Janitorial Services"
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/24401717-fdfe502b
Modify Your Subscription: https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
illumos-zfs | Archives | Modify Your Subscription
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/23047029-187a0c8d
Modify Your Subscription: https://www.listbox.com/member/?member_id=23047029&id_secret=23047029-2e85923f
Powered by Listbox: http://www.listbox.com
George Wilson via illumos-zfs
2014-09-10 15:27:05 UTC
Permalink
You can use it on existing pools but the histogram only gets created
when you condense a space_map (a process by which ZFS tries to make the
space_map ondisk smaller). This means that when you look at an existing
pool it may have some space_maps with histograms and ones without.

Thanks,
George
Post by aurfalien via illumos-zfs
Wow!
Thank you very much George, you are both a gentlemen and a scholar to
an order of magnitude!
I assume it best to implement on fresh pools to see the most benefits?
My path will most limey be to replicate on a system with it enabled,
then switch over to that system. I’ve 2 identical servers for one of
our main production resources.
- aurf
"Janitorial Services"
Post by George Wilson via illumos-zfs
The space_map histogram feature has been used in production at
Delphix for a while. The data it provide is being used to make
smarter decisions about how and where to allocate blocks. It also
gives us an idea of how badly fragmented things get on a pool. For
example, we've come up with a simplistic metric to define pool
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH
ALTROOT
dcenter 8.22T 5.50T 2.71T - 53% 66% 1.00x ONLINE -
The higher the frag% the more your free space is comprised of small
segments. We have been making many changes in this area and more to
come but the idea behind the histogram was to be able to lay the
foundation for improvements in allocation strategies. You can take a
closer look at the histogram on your pool by running 'zdb -mm[m] <pool>'.
Hope this helps. I will try to get a more extensive write up in a
blog along with some of the perf enhancements we've seen by making
smarter allocations decisions. Unfortunately right now I'm pretty
busy with compressed ARC. If you have more questions please feel free
to ask (post or email directly).
Thanks,
George
Post by aurfalien via illumos-zfs
By the way, any one know who George is?
I’d like to ping him and see if he is satisfied yet ? :)
- aurf
"Janitorial Services"
Post by aurfalien via illumos-zfs
Hi Steven,
I gleaned this from an older Illumos post found here;
http://comments.gmane.org/gmane.os.illumos.zfs/2565
Of interest;
- There is a new spacemap_histogram on-disk feature flag. When it is
enabled spacemaps store more data about the amount of contiguous free
space in metaslabs. The current disk format only stores the total
amount of free space, which means that heavily fragmented metaslabs
can look appealing, causing us to read them off disk, even though they
don't have enough contiguous free space to satisfy large allocations,
leading us to continually load the same fragmented space maps over and
over again. The allocation algorithm that uses this information is
disabled by default and can be enabled via a tunable. It will become
the default allocator once George is satisfied with the amount of
performance testing it has received. We have extensively tested this
code both with the t unable enabled and disabled. It is not possible to
seperate out spacemap_histogram from the rest of this refactoring
because they were done together.
- aurf
"Janitorial Services"
On Sep 10, 2014, at 7:36 AM, Steven Hartland
Post by Steven Hartland via illumos-zfs
I've not used it I'm afraid as the man page provides no
real indication of what its benefit would be if used.
"This features allows ZFS to maintain more information
about how free space is organized within the pool.
Regards
Steve
----- Original Message ----- From: "aurfalien via illumos-zfs"
Sent: Wednesday, September 10, 2014 3:20 PM
Subject: [zfs] spacemap_histogram
Hi,
I’ve asked on the FreeBSD lists but no takers.
Curious if any one has tried the spacemap_histogram feature in production.
Seems cool, in theory anyways.
Thanks in advance,
- aurf
"Janitorial Services"
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
https://www.listbox.com/member/archive/rss/182191/24401717-fdfe502b
Modify Your Subscription: https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com <http://www.listbox.com/>
*illumos-zfs* | Archives
<https://www.listbox.com/member/archive/182191/=now>
<https://www.listbox.com/member/archive/rss/182191/22008002-303f2ff4> |
Modify
<https://www.listbox.com/member/?&>
Your Subscription [Powered by Listbox] <http://www.listbox.com/>
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/23047029-187a0c8d
Modify Your Subscription: https://www.listbox.com/member/?member_id=23047029&id_secret=23047029-2e85923f
Powered by Listbox: http://www.listbox.com
Jason Matthews via illumos-zfs
2014-09-10 15:44:28 UTC
Permalink
I am wrestling with fragmention on a number of oltp systems. Typical write rate is

Sent from my iPhone
You can use it on existing pools but the histogram only gets created when you condense a space_map (a process by which ZFS tries to make the space_map ondisk smaller). This means that when you look at an existing pool it may have some space_maps with histograms and ones without.
Thanks,
George
Post by aurfalien via illumos-zfs
Wow!
Thank you very much George, you are both a gentlemen and a scholar to an order of magnitude!
I assume it best to implement on fresh pools to see the most benefits?
My path will most limey be to replicate on a system with it enabled, then switch over to that system. I’ve 2 identical servers for one of our main production resources.
- aurf
"Janitorial Services"
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
dcenter 8.22T 5.50T 2.71T - 53% 66% 1.00x ONLINE -
The higher the frag% the more your free space is comprised of small segments. We have been making many changes in this area and more to come but the idea behind the histogram was to be able to lay the foundation for improvements in allocation strategies. You can take a closer look at the histogram on your pool by running 'zdb -mm[m] <pool>'.
Hope this helps. I will try to get a more extensive write up in a blog along with some of the perf enhancements we've seen by making smarter allocations decisions. Unfortunately right now I'm pretty busy with compressed ARC. If you have more questions please feel free to ask (post or email directly).
Thanks,
George
Post by aurfalien via illumos-zfs
By the way, any one know who George is?
I’d like to ping him and see if he is satisfied yet ? :)
- aurf
"Janitorial Services"
Post by aurfalien via illumos-zfs
Hi Steven,
I gleaned this from an older Illumos post found here;
http://comments.gmane.org/gmane.os.illumos.zfs/2565
Of interest;
- There is a new spacemap_histogram on-disk feature flag. When it is
enabled spacemaps store more data about the amount of contiguous free
space in metaslabs. The current disk format only stores the total
amount of free space, which means that heavily fragmented metaslabs
can look appealing, causing us to read them off disk, even though they
don't have enough contiguous free space to satisfy large allocations,
leading us to continually load the same fragmented space maps over and
over again. The allocation algorithm that uses this information is
disabled by default and can be enabled via a tunable. It will become
the default allocator once George is satisfied with the amount of
performance testing it has received. We have extensively tested this
code bo
t
h with the t
unable enabled and disabled. It is not possible to
seperate out spacemap_histogram from the rest of this refactoring
because they were done together.
- aurf
"Janitorial Services"
Post by Steven Hartland via illumos-zfs
I've not used it I'm afraid as the man page provides no
real indication of what its benefit would be if used.
"This features allows ZFS to maintain more information
about how free space is organized within the pool.
Regards
Steve
Sent: Wednesday, September 10, 2014 3:20 PM
Subject: [zfs] spacemap_histogram
Hi,
I’ve asked on the FreeBSD lists but no takers.
Curious if any one has tried the spacemap_histogram feature in production.
Seems cool, in theory anyways.
Thanks in advance,
- aurf
"Janitorial Services"
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/24401717-fdfe502b
Modify Your Subscription: https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
illumos-zfs | Archives | Modify Your Subscription
illumos-zfs | Archives | Modify Your Subscription
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/23047029-187a0c8d
Modify Your Subscription: https://www.listbox.com/member/?member_id=23047029&id_secret=23047029-2e85923f
Powered by Listbox: http://www.listbox.com
Jason Matthews via illumos-zfs
2014-09-10 15:56:35 UTC
Permalink
I am struggling with fragmentation on a number of oltp systems that write 8k I/Os. I see metaslabs that are 48-54% free with the largest contiguous space below 600k.

I have been defragmenting some systems with zfs send/receive and remounting the new fs in the zone. This yields improvements. However, while This is okay for Db slaves that can take some scheduled down time but the masters are more sensitive.

How big is a typical space map on a 1tb vdev?

I am toying with the idea of setting debug_metaslab=1 to cache all the spacemap data. I am willing to trade off say 4-8gb of ram to alleviate the write performance issues in the short term until I can migrate to new pools or defrag with zfs send/recv.

Thoughts?

Sent from my iPhone
You can use it on existing pools but the histogram only gets created when you condense a space_map (a process by which ZFS tries to make the space_map ondisk smaller). This means that when you look at an existing pool it may have some space_maps with histograms and ones without.
Thanks,
George
Post by aurfalien via illumos-zfs
Wow!
Thank you very much George, you are both a gentlemen and a scholar to an order of magnitude!
I assume it best to implement on fresh pools to see the most benefits?
My path will most limey be to replicate on a system with it enabled, then switch over to that system. I’ve 2 identical servers for one of our main production resources.
- aurf
"Janitorial Services"
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
dcenter 8.22T 5.50T 2.71T - 53% 66% 1.00x ONLINE -
The higher the frag% the more your free space is comprised of small segments. We have been making many changes in this area and more to come but the idea behind the histogram was to be able to lay the foundation for improvements in allocation strategies. You can take a closer look at the histogram on your pool by running 'zdb -mm[m] <pool>'.
Hope this helps. I will try to get a more extensive write up in a blog along with some of the perf enhancements we've seen by making smarter allocations decisions. Unfortunately right now I'm pretty busy with compressed ARC. If you have more questions please feel free to ask (post or email directly).
Thanks,
George
Post by aurfalien via illumos-zfs
By the way, any one know who George is?
I’d like to ping him and see if he is satisfied yet ? :)
- aurf
"Janitorial Services"
Post by aurfalien via illumos-zfs
Hi Steven,
I gleaned this from an older Illumos post found here;
http://comments.gmane.org/gmane.os.illumos.zfs/2565
Of interest;
- There is a new spacemap_histogram on-disk feature flag. When it is
enabled spacemaps store more data about the amount of contiguous free
space in metaslabs. The current disk format only stores the total
amount of free space, which means that heavily fragmented metaslabs
can look appealing, causing us to read them off disk, even though they
don't have enough contiguous free space to satisfy large allocations,
leading us to continually load the same fragmented space maps over and
over again. The allocation algorithm that uses this information is
disabled by default and can be enabled via a tunable. It will become
the default allocator once George is satisfied with the amount of
performance testing it has received. We have extensively tested this
code bo
t
h with the t
unable enabled and disabled. It is not possible to
seperate out spacemap_histogram from the rest of this refactoring
because they were done together.
- aurf
"Janitorial Services"
Post by Steven Hartland via illumos-zfs
I've not used it I'm afraid as the man page provides no
real indication of what its benefit would be if used.
"This features allows ZFS to maintain more information
about how free space is organized within the pool.
Regards
Steve
Sent: Wednesday, September 10, 2014 3:20 PM
Subject: [zfs] spacemap_histogram
Hi,
I’ve asked on the FreeBSD lists but no takers.
Curious if any one has tried the spacemap_histogram feature in production.
Seems cool, in theory anyways.
Thanks in advance,
- aurf
"Janitorial Services"
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/24401717-fdfe502b
Modify Your Subscription: https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
illumos-zfs | Archives | Modify Your Subscription
illumos-zfs | Archives | Modify Your Subscription
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/23047029-187a0c8d
Modify Your Subscription: https://www.listbox.com/member/?member_id=23047029&id_secret=23047029-2e85923f
Powered by Listbox: http://www.listbox.com
Vadim Comanescu via illumos-zfs
2014-09-12 18:22:06 UTC
Permalink
Hi George,

Thank you for the explanations. Really useful. Looking over the current
illumos-gate master I don't see the FRAG column available on the the output
of zfs list. Is that something that is present only at Delphix at the
moment?

Regards.

On Wed, Sep 10, 2014 at 6:27 PM, George Wilson via illumos-zfs <
You can use it on existing pools but the histogram only gets created when
you condense a space_map (a process by which ZFS tries to make the
space_map ondisk smaller). This means that when you look at an existing
pool it may have some space_maps with histograms and ones without.
Thanks,
George
Wow!
Thank you very much George, you are both a gentlemen and a scholar to an
order of magnitude!
I assume it best to implement on fresh pools to see the most benefits?
My path will most limey be to replicate on a system with it enabled, then
switch over to that system. I’ve 2 identical servers for one of our main
production resources.
- aurf
"Janitorial Services"
The space_map histogram feature has been used in production at Delphix for
a while. The data it provide is being used to make smarter decisions about
how and where to allocate blocks. It also gives us an idea of how badly
fragmented things get on a pool. For example, we've come up with a
simplistic metric to define pool fragmentation based on the histogram
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH
ALTROOT
dcenter 8.22T 5.50T 2.71T - 53% 66% 1.00x ONLINE -
The higher the frag% the more your free space is comprised of small
segments. We have been making many changes in this area and more to come
but the idea behind the histogram was to be able to lay the foundation for
improvements in allocation strategies. You can take a closer look at the
histogram on your pool by running 'zdb -mm[m] <pool>'.
Hope this helps. I will try to get a more extensive write up in a blog
along with some of the perf enhancements we've seen by making smarter
allocations decisions. Unfortunately right now I'm pretty busy with
compressed ARC. If you have more questions please feel free to ask (post or
email directly).
Thanks,
George
By the way, any one know who George is?
I’d like to ping him and see if he is satisfied yet ? :)
- aurf
"Janitorial Services"
Hi Steven,
I gleaned this from an older Illumos post found here;
http://comments.gmane.org/gmane.os.illumos.zfs/2565
Of interest;
- There is a new spacemap_histogram on-disk feature flag. When it is
enabled spacemaps store more data about the amount of contiguous free
space in metaslabs. The current disk format only stores the total
amount of free space, which means that heavily fragmented metaslabs
can look appealing, causing us to read them off disk, even though they
don't have enough contiguous free space to satisfy large allocations,
leading us to continually load the same fragmented space maps over and
over again. The allocation algorithm that uses this information is
disabled by default and can be enabled via a tunable. It will become
the default allocator once George is satisfied with the amount of
performance testing it has received. We have extensively tested this
code bo
t
h with the t
unable enabled and disabled. It is not possible to
seperate out spacemap_histogram from the rest of this refactoring
because they were done together.
- aurf
"Janitorial Services"
I've not used it I'm afraid as the man page provides no
real indication of what its benefit would be if used.
"This features allows ZFS to maintain more information
about how free space is organized within the pool.
Regards
Steve
----- Original Message ----- From: "aurfalien via illumos-zfs" <
Sent: Wednesday, September 10, 2014 3:20 PM
Subject: [zfs] spacemap_histogram
Hi,
I’ve asked on the FreeBSD lists but no takers.
Curious if any one has tried the spacemap_histogram feature in production.
Seems cool, in theory anyways.
Thanks in advance,
- aurf
"Janitorial Services"
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
https://www.listbox.com/member/archive/rss/182191/24401717-fdfe502b
Modify Your Subscription: https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
*illumos-zfs* | Archives
<https://www.listbox.com/member/archive/182191/=now>
<https://www.listbox.com/member/archive/rss/182191/22008002-303f2ff4> |
Modify <https://www.listbox.com/member/?&> Your Subscription
<http://www.listbox.com/>
*illumos-zfs* | Archives
<https://www.listbox.com/member/archive/182191/=now>
<https://www.listbox.com/member/archive/rss/182191/23654017-682fbee9> |
Modify
<https://www.listbox.com/member/?&>
Your Subscription <http://www.listbox.com>
--
Vadim Comanescu
Twitter: @vadimcomanescu
Github: https://github.com/vadimcomanescu
Blog: http://vadimcomanescu.wordpress.com



-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/23047029-187a0c8d
Modify Your Subscription: https://www.listbox.com/member/?member_id=23047029&id_secret=23047029-2e85923f
Powered by Listbox: http://www.listbox.com
aurfalien via illumos-zfs
2014-09-13 20:46:12 UTC
Permalink
Hi,

Have you tried spool list?

Granted my distro is FreeBSD but zfs list does yield slightly diff info than zpool list.

So try zpool list.

- aurf

"Janitorial Services"
Post by Vadim Comanescu via illumos-zfs
Hi George,
Thank you for the explanations. Really useful. Looking over the current illumos-gate master I don't see the FRAG column available on the the output of zfs list. Is that something that is present only at Delphix at the moment?
Regards.
You can use it on existing pools but the histogram only gets created when you condense a space_map (a process by which ZFS tries to make the space_map ondisk smaller). This means that when you look at an existing pool it may have some space_maps with histograms and ones without.
Thanks,
George
Post by aurfalien via illumos-zfs
Wow!
Thank you very much George, you are both a gentlemen and a scholar to an order of magnitude!
I assume it best to implement on fresh pools to see the most benefits?
My path will most limey be to replicate on a system with it enabled, then switch over to that system. I’ve 2 identical servers for one of our main production resources.
- aurf
"Janitorial Services"
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
dcenter 8.22T 5.50T 2.71T - 53% 66% 1.00x ONLINE -
The higher the frag% the more your free space is comprised of small segments. We have been making many changes in this area and more to come but the idea behind the histogram was to be able to lay the foundation for improvements in allocation strategies. You can take a closer look at the histogram on your pool by running 'zdb -mm[m] <pool>'.
Hope this helps. I will try to get a more extensive write up in a blog along with some of the perf enhancements we've seen by making smarter allocations decisions. Unfortunately right now I'm pretty busy with compressed ARC. If you have more questions please feel free to ask (post or email directly).
Thanks,
George
Post by aurfalien via illumos-zfs
By the way, any one know who George is?
I’d like to ping him and see if he is satisfied yet ? :)
- aurf
"Janitorial Services"
Post by aurfalien via illumos-zfs
Hi Steven,
I gleaned this from an older Illumos post found here;
http://comments.gmane.org/gmane.os.illumos.zfs/2565
Of interest;
- There is a new spacemap_histogram on-disk feature flag. When it is
enabled spacemaps store more data about the amount of contiguous free
space in metaslabs. The current disk format only stores the total
amount of free space, which means that heavily fragmented metaslabs
can look appealing, causing us to read them off disk, even though they
don't have enough contiguous free space to satisfy large allocations,
leading us to continually load the same fragmented space maps over and
over again. The allocation algorithm that uses this information is
disabled by default and can be enabled via a tunable. It will become
the default allocator once George is satisfied with the amount of
performance testing it has received. We have extensively tested this
code bo
t
h with the t
unable enabled and disabled. It is not possible to
seperate out spacemap_histogram from the rest of this refactoring
because they were done together.
- aurf
"Janitorial Services"
Post by Steven Hartland via illumos-zfs
I've not used it I'm afraid as the man page provides no
real indication of what its benefit would be if used.
"This features allows ZFS to maintain more information
about how free space is organized within the pool.
Regards
Steve
Sent: Wednesday, September 10, 2014 3:20 PM
Subject: [zfs] spacemap_histogram
Hi,
I’ve asked on the FreeBSD lists but no takers.
Curious if any one has tried the spacemap_histogram feature in production.
Seems cool, in theory anyways.
Thanks in advance,
- aurf
"Janitorial Services"
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/24401717-fdfe502b
Modify Your Subscription: https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
illumos-zfs | Archives | Modify Your Subscription
illumos-zfs | Archives | Modify Your Subscription
--
Vadim Comanescu
Github: https://github.com/vadimcomanescu
Blog: http://vadimcomanescu.wordpress.com
illumos-zfs | Archives | Modify Your Subscription
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/23047029-187a0c8d
Modify Your Subscription: https://www.listbox.com/member/?member_id=23047029&id_secret=23047029-2e85923f
Powered by Listbox: http://www.listbox.com
Vadim Comanescu via illumos-zfs
2014-09-17 08:41:17 UTC
Permalink
Sorry, wanted to say zpool list from the beginning, just mistyped. When
creating a new pool the FRAG column would indeed be available, for existing
pools that have the spacemap_histogram feature active is still not
displayed. For example:

***@storage:~# zpool list tank

NAME SIZE ALLOC FREE EXPANDSZ CAP DEDUP HEALTH ALTROOT

tank 10.9T 2.56T 8.31T - 23% 1.00x ONLINE -

***@storage:~# zpool get ***@spacemap_histogram tank

NAME PROPERTY VALUE SOURCE

tank ***@spacemap_histogram active local

My question was actually related to this case when the feature is active
and the frag column is missing. Thanks.
Post by aurfalien via illumos-zfs
Hi,
Have you tried spool list?
Granted my distro is FreeBSD but *zfs list* does yield slightly diff info
than *zpool list*.
So try z*pool list*.
- aurf
"Janitorial Services"
On Sep 12, 2014, at 11:22 AM, Vadim Comanescu via illumos-zfs <
Hi George,
Thank you for the explanations. Really useful. Looking over the current
illumos-gate master I don't see the FRAG column available on the the output
of zfs list. Is that something that is present only at Delphix at the
moment?
Regards.
On Wed, Sep 10, 2014 at 6:27 PM, George Wilson via illumos-zfs <
You can use it on existing pools but the histogram only gets created when
you condense a space_map (a process by which ZFS tries to make the
space_map ondisk smaller). This means that when you look at an existing
pool it may have some space_maps with histograms and ones without.
Thanks,
George
Wow!
Thank you very much George, you are both a gentlemen and a scholar to an
order of magnitude!
I assume it best to implement on fresh pools to see the most benefits?
My path will most limey be to replicate on a system with it enabled, then
switch over to that system. I’ve 2 identical servers for one of our main
production resources.
- aurf
"Janitorial Services"
The space_map histogram feature has been used in production at Delphix
for a while. The data it provide is being used to make smarter decisions
about how and where to allocate blocks. It also gives us an idea of how
badly fragmented things get on a pool. For example, we've come up with a
simplistic metric to define pool fragmentation based on the histogram
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH
ALTROOT
dcenter 8.22T 5.50T 2.71T - 53% 66% 1.00x ONLINE -
The higher the frag% the more your free space is comprised of small
segments. We have been making many changes in this area and more to come
but the idea behind the histogram was to be able to lay the foundation for
improvements in allocation strategies. You can take a closer look at the
histogram on your pool by running 'zdb -mm[m] <pool>'.
Hope this helps. I will try to get a more extensive write up in a blog
along with some of the perf enhancements we've seen by making smarter
allocations decisions. Unfortunately right now I'm pretty busy with
compressed ARC. If you have more questions please feel free to ask (post or
email directly).
Thanks,
George
By the way, any one know who George is?
I’d like to ping him and see if he is satisfied yet ? :)
- aurf
"Janitorial Services"
Hi Steven,
I gleaned this from an older Illumos post found here;
http://comments.gmane.org/gmane.os.illumos.zfs/2565
Of interest;
- There is a new spacemap_histogram on-disk feature flag. When it is
enabled spacemaps store more data about the amount of contiguous free
space in metaslabs. The current disk format only stores the total
amount of free space, which means that heavily fragmented metaslabs
can look appealing, causing us to read them off disk, even though they
don't have enough contiguous free space to satisfy large allocations,
leading us to continually load the same fragmented space maps over and
over again. The allocation algorithm that uses this information is
disabled by default and can be enabled via a tunable. It will become
the default allocator once George is satisfied with the amount of
performance testing it has received. We have extensively tested this
code bo
t
h with the t
unable enabled and disabled. It is not possible to
seperate out spacemap_histogram from the rest of this refactoring
because they were done together.
- aurf
"Janitorial Services"
I've not used it I'm afraid as the man page provides no
real indication of what its benefit would be if used.
"This features allows ZFS to maintain more information
about how free space is organized within the pool.
Regards
Steve
----- Original Message ----- From: "aurfalien via illumos-zfs" <
Sent: Wednesday, September 10, 2014 3:20 PM
Subject: [zfs] spacemap_histogram
Hi,
I’ve asked on the FreeBSD lists but no takers.
Curious if any one has tried the spacemap_histogram feature in production.
Seems cool, in theory anyways.
Thanks in advance,
- aurf
"Janitorial Services"
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
https://www.listbox.com/member/archive/rss/182191/24401717-fdfe502b
Modify Your Subscription: https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
*illumos-zfs* | Archives
<https://www.listbox.com/member/archive/182191/=now>
<https://www.listbox.com/member/archive/rss/182191/22008002-303f2ff4> |
Modify <https://www.listbox.com/member/?&> Your Subscription
<http://www.listbox.com/>
*illumos-zfs* | Archives
<https://www.listbox.com/member/archive/182191/=now>
<https://www.listbox.com/member/archive/rss/182191/23654017-682fbee9> |
Modify <https://www.listbox.com/member/?&> Your Subscription
<http://www.listbox.com/>
--
Vadim Comanescu
Github: https://github.com/vadimcomanescu
Blog: http://vadimcomanescu.wordpress.com
*illumos-zfs* | Archives
<https://www.listbox.com/member/archive/182191/=now>
<https://www.listbox.com/member/archive/rss/182191/24758408-e0240379> |
Modify
<https://www.listbox.com/member/?&>
Your Subscription <http://www.listbox.com/>
--
Vadim Comanescu
Twitter: @vadimcomanescu
Github: https://github.com/vadimcomanescu
Blog: http://vadimcomanescu.wordpress.com



-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/23047029-187a0c8d
Modify Your Subscription: https://www.listbox.com/member/?member_id=23047029&id_secret=23047029-2e85923f
Powered by Listbox: http://www.listbox.com
George Wilson via illumos-zfs
2014-09-17 13:14:26 UTC
Permalink
Are you running the latest bits? The reason I ask is that we introduced
the spacemap_histogram as a feature but did not expose it via the cli
until later.

Here's all the related commits from newest to oldest:

commit 7a09f97bc0d52b763c580864e78a665b15be37f8
Author: George Wilson <***@delphix.com>
Date: Tue Sep 16 11:51:18 2014 -0800

5147 zpool list -v should show individual disk capacity
Reviewed by: Adam Leventhal <***@delphix.com>
Reviewed by: Christopher Siden <***@delphix.com>
Reviewed by: Matthew Ahrens <***@delphix.com>
Reviewed by: Richard Elling <***@gmail.com>
Approved by: Dan McDonald <***@omniti.com>

commit 2e4c998613148111f2fc5371085331ffb39122ff
Author: George Wilson <***@delphix.com>
Date: Sat Jul 19 12:19:24 2014 -0800

4976 zfs should only avoid writing to a failing non-redundant
top-level vdev
4977 mdb error in ::spa_space from space_cb() if a metaslab's ms_sm
is NULL
4978 ztest fails in get_metaslab_refcount()
4979 extend free space histogram to device and pool
4980 metaslabs should have a fragmentation metric
4981 remove fragmented ops vector from block allocator
4982 space_map object should proactively upgrade when feature is
enabled
4983 need to collect metaslab information via mdb
4984 device selection should use fragmentation metric
Reviewed by: Matthew Ahrens <***@delphix.com>
Reviewed by: Adam Leventhal <***@delphix.com>
Reviewed by: Christopher Siden <***@delphix.com>
Approved by: Garrett D'Amore <***@damore.org>

commit 0713e232b7712cd27d99e1e935ebb8d5de61c57d
Author: George Wilson <***@delphix.com>
Date: Tue Oct 1 13:25:53 2013 -0800

4101 metaslab_debug should allow for fine-grained control
4102 space_maps should store more information about themselves
4103 space map object blocksize should be increased
4104 ::spa_space no longer works
4105 removing a mirrored log device results in a leaked object
4106 asynchronously load metaslab
Reviewed by: Matthew Ahrens <***@delphix.com>
Reviewed by: Adam Leventhal <***@delphix.com>
Reviewed by: Sebastien Roy <***@delphix.com>
Approved by: Garrett D'Amore <***@damore.org>

Thanks,
George
Post by Vadim Comanescu via illumos-zfs
Sorry, wanted to say zpool list from the beginning, just mistyped.
When creating a new pool the FRAG column would indeed be available,
for existing pools that have the spacemap_histogram feature active is
NAME SIZE ALLOC FREE EXPANDSZ CAP DEDUP HEALTH ALTROOT
tank 10.9T 2.56T 8.31T - 23% 1.00x ONLINE -
NAME PROPERTY VALUE SOURCE
My question was actually related to this case when the feature is
active and the frag column is missing. Thanks.
Hi,
Have you tried spool list?
Granted my distro is FreeBSD but /zfs list/ does yield slightly
diff info than /zpool list/.
So try z/pool list/.
- aurf
"Janitorial Services"
On Sep 12, 2014, at 11:22 AM, Vadim Comanescu via illumos-zfs
Post by Vadim Comanescu via illumos-zfs
Hi George,
Thank you for the explanations. Really useful. Looking over the
current illumos-gate master I don't see the FRAG column available
on the the output of zfs list. Is that something that is present
only at Delphix at the moment?
Regards.
On Wed, Sep 10, 2014 at 6:27 PM, George Wilson via illumos-zfs
You can use it on existing pools but the histogram only gets
created when you condense a space_map (a process by which ZFS
tries to make the space_map ondisk smaller). This means that
when you look at an existing pool it may have some space_maps
with histograms and ones without.
Thanks,
George
Post by aurfalien via illumos-zfs
Wow!
Thank you very much George, you are both a gentlemen and a
scholar to an order of magnitude!
I assume it best to implement on fresh pools to see the most benefits?
My path will most limey be to replicate on a system with it
enabled, then switch over to that system. I’ve 2 identical
servers for one of our main production resources.
- aurf
"Janitorial Services"
On Sep 10, 2014, at 8:04 AM, George Wilson
Post by George Wilson via illumos-zfs
The space_map histogram feature has been used in production
at Delphix for a while. The data it provide is being used
to make smarter decisions about how and where to allocate
blocks. It also gives us an idea of how badly fragmented
things get on a pool. For example, we've come up with a
simplistic metric to define pool fragmentation based on the
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP
HEALTH ALTROOT
dcenter 8.22T 5.50T 2.71T - 53% 66% 1.00x
ONLINE -
The higher the frag% the more your free space is comprised
of small segments. We have been making many changes in this
area and more to come but the idea behind the histogram was
to be able to lay the foundation for improvements in
allocation strategies. You can take a closer look at the
histogram on your pool by running 'zdb -mm[m] <pool>'.
Hope this helps. I will try to get a more extensive write
up in a blog along with some of the perf enhancements we've
seen by making smarter allocations decisions. Unfortunately
right now I'm pretty busy with compressed ARC. If you have
more questions please feel free to ask (post or email
directly).
Thanks,
George
Post by aurfalien via illumos-zfs
By the way, any one know who George is?
I’d like to ping him and see if he is satisfied yet ? :)
- aurf
"Janitorial Services"
On Sep 10, 2014, at 7:42 AM, aurfalien
Post by aurfalien via illumos-zfs
Hi Steven,
I gleaned this from an older Illumos post found here;
http://comments.gmane.org/gmane.os.illumos.zfs/2565
Of interest;
- There is a new spacemap_histogram on-disk feature flag.
When it is
enabled spacemaps store more data about the amount of
contiguous free
space in metaslabs. The current disk format only stores the total
amount of free space, which means that heavily fragmented
metaslabs
can look appealing, causing us to read them off disk,
even though they
don't have enough contiguous free space to satisfy large
allocations,
leading us to continually load the same fragmented space
maps over and
over again. The allocation algorithm that uses this
information is
disabled by default and can be enabled via a tunable. It
will become
the default allocator once George is satisfied with the amount of
performance testing it has received. We have extensively
tested this
code bo t h with the t unable enabled and disabled. It is
not possible to
seperate out spacemap_histogram from the rest of this refactoring
because they were done together.
- aurf
"Janitorial Services"
On Sep 10, 2014, at 7:36 AM, Steven Hartland
Post by Steven Hartland via illumos-zfs
I've not used it I'm afraid as the man page provides no
real indication of what its benefit would be if used.
"This features allows ZFS to maintain more information
about how free space is organized within the pool.
Regards
Steve
----- Original Message ----- From: "aurfalien via
Sent: Wednesday, September 10, 2014 3:20 PM
Subject: [zfs] spacemap_histogram
Hi,
I’ve asked on the FreeBSD lists but no takers.
Curious if any one has tried the spacemap_histogram
feature in production.
Seems cool, in theory anyways.
Thanks in advance,
- aurf
"Janitorial Services"
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
https://www.listbox.com/member/archive/rss/182191/24401717-fdfe502b
Modify Your Subscription: https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
<http://www.listbox.com/>
*illumos-zfs* | Archives
<https://www.listbox.com/member/archive/182191/=now>
<https://www.listbox.com/member/archive/rss/182191/22008002-303f2ff4>
| Modify <https://www.listbox.com/member/?&> Your
Subscription [Powered by Listbox] <http://www.listbox.com/>
*illumos-zfs* | Archives
<https://www.listbox.com/member/archive/182191/=now>
<https://www.listbox.com/member/archive/rss/182191/23654017-682fbee9>
| Modify <https://www.listbox.com/member/?&> Your
Subscription [Powered by Listbox] <http://www.listbox.com/>
--
Vadim Comanescu
Github: https://github.com/vadimcomanescu
Blog: http://vadimcomanescu.wordpress.com
<http://vadimcomanescu.wordpress.com/>
*illumos-zfs* | Archives
<https://www.listbox.com/member/archive/182191/=now>
<https://www.listbox.com/member/archive/rss/182191/24758408-e0240379>
| Modify
<https://www.listbox.com/member/?&>
Your Subscription [Powered by Listbox] <http://www.listbox.com/>
--
Vadim Comanescu
Github: https://github.com/vadimcomanescu
Blog: http://vadimcomanescu.wordpress.com
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/23047029-187a0c8d
Modify Your Subscription: https://www.listbox.com/member/?member_id=23047029&id_secret=23047029-2e85923f
Powered by Listbox: http://www.listbox.com

Xin Li via illumos-zfs
2014-09-10 15:06:14 UTC
Permalink
Post by Steven Hartland via illumos-zfs
I've not used it I'm afraid as the man page provides no
real indication of what its benefit would be if used.
"This features allows ZFS to maintain more information
about how free space is organized within the pool.
The documentation could probably be improved.

Enabling spacemap_histogram allows ZFS to store more data about the
amount of contiguous free space in metaslabs. This information will be
used by the allocator (enabled by default) to determine if a metaslab is
good candidate for a specific allocation.

When a metaslab is heavily fragmented but do have plenty of free space
and when the system is requesting for a large chunk of space, with old
code, ZFS has to load the metaslab, then decide that it's not the right
candidate, then look for a different one. The new code prevents this
and therefore improves writing performance.

The current Illumos development trunk and FreeBSD 10.0-STABLE after
r269773 (about a month ago) as well as FreeNAS development trunk.

The histogram information have been added in FreeBSD 9.3-RELEASE and
various FreeNAS 9.2.x releases, although the information were not used.

I have used it for a while on personal storage and working laptop for a
while now.

Cheers,
Post by Steven Hartland via illumos-zfs
Regards
Steve
----- Original Message ----- From: "aurfalien via illumos-zfs"
Sent: Wednesday, September 10, 2014 3:20 PM
Subject: [zfs] spacemap_histogram
Hi,
I’ve asked on the FreeBSD lists but no takers.
Curious if any one has tried the spacemap_histogram feature in production.
Seems cool, in theory anyways.
Thanks in advance,
- aurf
"Janitorial Services"
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
https://www.listbox.com/member/archive/rss/182191/24401717-fdfe502b
Modify Your Subscription: https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
https://www.listbox.com/member/archive/rss/182191/22993488-e3cd949b
https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
aurfalien via illumos-zfs
2014-09-10 15:21:27 UTC
Permalink
Hi Xin,

I think I’ve seen you on the FreeNAS dev lists, you are bizzy indeed!

Yes, I’ve seen this feature flag in v9.2.1.7.

Cool info, many thanks.

- aurf

"Janitorial Services"
Post by Xin Li via illumos-zfs
Post by Steven Hartland via illumos-zfs
I've not used it I'm afraid as the man page provides no
real indication of what its benefit would be if used.
"This features allows ZFS to maintain more information
about how free space is organized within the pool.
The documentation could probably be improved.
Enabling spacemap_histogram allows ZFS to store more data about the
amount of contiguous free space in metaslabs. This information will be
used by the allocator (enabled by default) to determine if a metaslab is
good candidate for a specific allocation.
When a metaslab is heavily fragmented but do have plenty of free space
and when the system is requesting for a large chunk of space, with old
code, ZFS has to load the metaslab, then decide that it's not the right
candidate, then look for a different one. The new code prevents this
and therefore improves writing performance.
The current Illumos development trunk and FreeBSD 10.0-STABLE after
r269773 (about a month ago) as well as FreeNAS development trunk.
The histogram information have been added in FreeBSD 9.3-RELEASE and
various FreeNAS 9.2.x releases, although the information were not used.
I have used it for a while on personal storage and working laptop for a
while now.
Cheers,
Post by Steven Hartland via illumos-zfs
Regards
Steve
----- Original Message ----- From: "aurfalien via illumos-zfs"
Sent: Wednesday, September 10, 2014 3:20 PM
Subject: [zfs] spacemap_histogram
Hi,
I’ve asked on the FreeBSD lists but no takers.
Curious if any one has tried the spacemap_histogram feature in production.
Seems cool, in theory anyways.
Thanks in advance,
- aurf
"Janitorial Services"
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
https://www.listbox.com/member/archive/rss/182191/24401717-fdfe502b
Modify Your Subscription: https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
https://www.listbox.com/member/archive/rss/182191/22993488-e3cd949b
https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182191/23047029-187a0c8d
Modify Your Subscription: https://www.listbox.com/member/?member_id=23047029&id_secret=23047029-2e85923f
Powered by Listbox: http://www.listbox.com
aurfalien via illumos-zfs
2014-09-10 18:17:22 UTC
Permalink
Post by Xin Li via illumos-zfs
Post by Steven Hartland via illumos-zfs
I've not used it I'm afraid as the man page provides no
real indication of what its benefit would be if used.
"This features allows ZFS to maintain more information
about how free space is organized within the pool.
The documentation could probably be improved.
Enabling spacemap_histogram allows ZFS to store more data about the
amount of contiguous free space in metaslabs. This information will be
used by the allocator (enabled by default) to determine if a metaslab is
good candidate for a specific allocation.
When a metaslab is heavily fragmented but do have plenty of free space
and when the system is requesting for a large chunk of space, with old
code, ZFS has to load the metaslab, then decide that it's not the right
candidate, then look for a different one. The new code prevents this
and therefore improves writing performance.
The current Illumos development trunk and FreeBSD 10.0-STABLE after
r269773 (about a month ago) as well as FreeNAS development trunk.
The histogram information have been added in FreeBSD 9.3-RELEASE and
various FreeNAS 9.2.x releases, although the information were not used.
I have used it for a while on personal storage and working laptop for a
while now.
Cheers,
Hi Xin,

When you say that the information were not being used, do you mean that there is no way to attain info like what George had mentioned in his example like so;

NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
dcenter 8.22T 5.50T 2.71T - 53% 66% 1.00x ONLINE -

I see that "zpool list" on either FreeBSD or FreeNAS does’t show the FRAG column.


- aurf

"Janitorial Services"
Post by Xin Li via illumos-zfs
Post by Steven Hartland via illumos-zfs
Regards
Steve
----- Original Message ----- From: "aurfalien via illumos-zfs"
Sent: Wednesday, September 10, 2014 3:20 PM
Subject: [zfs] spacemap_histogram
Hi,
I’ve asked on the FreeBSD lists but no takers.
Curious if any one has tried the spacemap_histogram feature in production.
Seems cool, in theory anyways.
Thanks in advance,
- aurf
"Janitorial Services"
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
https://www.listbox.com/member/archive/rss/182191/24401717-fdfe502b
Modify Your Subscription: https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
-------------------------------------------
illumos-zfs
Archives: https://www.listbox.com/member/archive/182191/=now
https://www.listbox.com/member/archive/rss/182191/22993488-e3cd949b
https://www.listbox.com/member/?&
Powered by Listbox: http://www.listbox.com
Andriy Gapon via illumos-zfs
2014-09-10 18:29:46 UTC
Permalink
Post by aurfalien via illumos-zfs
Hi Xin,
When you say that the information were not being used, do you mean that there is no way to attain info like what George had mentioned in his example like so;
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
dcenter 8.22T 5.50T 2.71T - 53% 66% 1.00x ONLINE -
I see that "zpool list" on either FreeBSD or FreeNAS does’t show the FRAG column.
jfyi:
$ uname -a
... FreeBSD 11.0-CURRENT ... r271156 ...
$ zpool list
NAME SIZE ALLOC FREE FRAG EXPANDSZ CAP DEDUP HEALTH ALTROOT
pond 2.70T 1.22T 1.48T 6% - 45% 1.00x ONLINE -

Not sure why EXPANDSZ and FRAG are in different order...
--
Andriy Gapon
aurfalien via illumos-zfs
2014-09-10 18:38:08 UTC
Permalink
Post by Andriy Gapon via illumos-zfs
Post by aurfalien via illumos-zfs
Hi Xin,
When you say that the information were not being used, do you mean that there is no way to attain info like what George had mentioned in his example like so;
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
dcenter 8.22T 5.50T 2.71T - 53% 66% 1.00x ONLINE -
I see that "zpool list" on either FreeBSD or FreeNAS does’t show the FRAG column.
$ uname -a
... FreeBSD 11.0-CURRENT ... r271156 ...
$ zpool list
NAME SIZE ALLOC FREE FRAG EXPANDSZ CAP DEDUP HEALTH ALTROOT
pond 2.70T 1.22T 1.48T 6% - 45% 1.00x ONLINE -
Not sure why EXPANDSZ and FRAG are in different order...
--
Andriy Gapon
Hi and thanks Andriy, yes I’m a bit conservative on my rels, doing 9.3 at the moment. Good to know 11 does it.

- aurf

"Janitorial Services"
Loading...