1c458 Space overhead is much higher on ashift=12 raidz - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Base System > Storage

Storage Place to ask questions about partitioning, labelling, filesystems, encryption or anything else related to storage area.

Reply
 
Thread Tools Display Modes
  #1  
Old August 19th, 2012, 06:37
belon_cfy belon_cfy is offline
Member
 
Join Date: Feb 2012
Posts: 100
Thanks: 7
Thanked 1 Time in 1 Post
Default Space overhead is much higher on ashift=12 raidz

Hi,
My current server consume almost double of space on the ashift=12 raidz especially storing a lot of small files in the server even the recordsize has been set to 128K, may I know is there any zfs update to resolve this issue, or should I need to choice mirror instead of raidz because space saving seems to be more noticable on mirror in this case.
Reply With Quote
  #2  
Old August 19th, 2012, 14:38
Savagedlight Savagedlight is offline
Member
 
Join Date: Jan 2010
Location: Norway
Posts: 250
Thanks: 31
Thanked 47 Times in 35 Posts
Default

Your RaidZ with ashift=12 is consuming twice as much space compared to what? Do you store the exact same data in both places?

Do you have drives with a 4k sector size? ashift=12 instructs ZFS to use record sizes which are a multiple of 4kiB (2^12), which prevents several performance problems with such drives.

If you set record size to 128k, minimum space taken by each file will be 128kiB regardless of the ashift setting. (I'm not entirely on this one)
Quoting the zfs manpage, regarding recordsize; emphasis is mine:
Code:
For databases that create very large files but access them in small 
random  chunks,  these  algorithms  may be suboptimal. Specifying a
recordsize greater than or equal to the record size of the database
can	result	in significant performance gains. Use of this property
for general purpose file systems is strongly discouraged,  and  may
adversely affect performance.
Reply With Quote
  #3  
Old August 19th, 2012, 14:49
gkontos's Avatar
gkontos gkontos is offline
Senior Member
 
Join Date: Dec 2009
Location: Polidendri, GR
Posts: 1,263
Thanks: 42
Thanked 218 Times in 164 Posts
Default

The overhead is always an issue when dealing with very small files on 4K drives. You could choose not to align them for 4K but there would be a performance impact. Sometimes it is a matter of choice, speed versus capacity.

http://lists.freebsd.org/pipermail/f...ay/014311.html
__________________
Powered by BareBSD
Reply With Quote
  #4  
Old August 19th, 2012, 15:49
t1066 t1066 is offline
Member
 
Join Date: Jun 2010
Posts: 141
Thanks: 3
Thanked 25 Times in 24 Posts
Default

I had some data about changes from 512 to 4k in the thread. The changes on the sizes of the filesystems /usr/src and /usr/ports are particularly interesting since they have lots of small files.
Reply With Quote
  #5  
Old August 20th, 2012, 03:19
belon_cfy belon_cfy is offline
Member
 
Join Date: Feb 2012
Posts: 100
Thanks: 7
Thanked 1 Time in 1 Post
Default

OK, so I would rather use 512b on a 4k disk for storing backup but sacrifice some of the performance, it will be better in space saving.
Reply With Quote
  #6  
Old August 20th, 2012, 04:51
wblock@'s Avatar
wblock@ wblock@ is offline
Moderator
 
Join Date: Sep 2009
Location: Milky Way galaxy
Posts: 7,701
Thanks: 429
Thanked 1,757 Times in 1,456 Posts
Default

Benchmark it first. Doing misaligned operations can destroy performance. Or maybe pick a filesystem that handles fragments better. Setting UFS to optimize for space rather than speed might do it. I'd think ZFS would do block suballocation also, maybe optionally.
Reply With Quote
  #7  
Old August 22nd, 2012, 01:03
phoenix's Avatar
phoenix phoenix is offline
Moderator
 
Join Date: Nov 2008
Location: Kamloops, BC, Canada
Posts: 3,140
Thanks: 43
Thanked 700 Times in 578 Posts
Default

Or, enable compression and not worry about it.
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
The Following User Says Thank You to phoenix For This Useful Post:
xibo (August 22nd, 2012)
  #8  
Old August 23rd, 2012, 14:03
Sebulon's Avatar
Sebulon Sebulon is offline
Member
 
Join Date: Nov 2010
Location: Uppsala, Sweden
Posts: 558
Thanks: 24
Thanked 93 Times in 78 Posts
Default

Quote:
Originally Posted by phoenix View Post
Or, enable compression and not worry about it.
Well, if you had compression enabled before- when there was ashift=9, and have compression enabled now with ashift=12, the space consumed will have increased. I too have noticed this, which to me was to be expected. Especially on filesystems like t1066 said, /, /usr, /usr/local, /usr/ports, /var and so on. And no, or a very small increase on other filesystems where most files are larger, like /home e.g.

But I agree with you that between performance and a space increase on small files, performance is preferable.

/Sebulon
Reply With Quote
  #9  
Old August 23rd, 2012, 17:46
gkontos's Avatar
gkontos gkontos is offline
Senior Member
 
Join Date: Dec 2009
Location: Polidendri, GR
Posts: 1,263
Thanks: 42
Thanked 218 Times in 164 Posts
Default

You can always use SAS drives instead.
__________________
Powered by BareBSD
Reply With Quote
  #10  
Old August 23rd, 2012, 19:35
Sebulon's Avatar
Sebulon Sebulon is offline
Member
 
Join Date: Nov 2010
Location: Uppsala, Sweden
Posts: 558
Thanks: 24
Thanked 93 Times in 78 Posts
Default

Quote:
Originally Posted by gkontos View Post
You can always use SAS drives instead.
Whaaat?

/Sebulon
Reply With Quote
  #11  
Old August 24th, 2012, 01:02
gkontos's Avatar
gkontos gkontos is offline
Senior Member
 
Join Date: Dec 2009
Location: Polidendri, GR
Posts: 1,263
Thanks: 42
Thanked 218 Times in 164 Posts
Default

Quote:
Originally Posted by Sebulon View Post
Whaaat?

/Sebulon
They are faster
__________________
Powered by BareBSD
Reply With Quote
  #12  
Old August 24th, 2012, 07:17
Sebulon's Avatar
Sebulon Sebulon is offline
Member
 
Join Date: Nov 2010
Location: Uppsala, Sweden
Posts: 558
Thanks: 24
Thanked 93 Times in 78 Posts
Default

Quote:
Originally Posted by gkontos View Post
They are faster
You have got to be janking my chain, right. You´re joking or something, cause I don´t follow. Speed has absolutely nothing to do with compression.

/Sebulon
Reply With Quote
  #13  
Old August 24th, 2012, 10:26
gkontos's Avatar
gkontos gkontos is offline
Senior Member
 
Join Date: Dec 2009
Location: Polidendri, GR
Posts: 1,263
Thanks: 42
Thanked 218 Times in 164 Posts
Default

Quote:
Originally Posted by Sebulon View Post
You have got to be janking my chain, right. You´re joking or something, cause I don´t follow. Speed has absolutely nothing to do with compression.

/Sebulon
I was not referring to you nor to compression. I simply pointed out that SAS drives are much faster than SATA.
__________________
Powered by BareBSD
Reply With Quote
  #14  
Old August 24th, 2012, 13:04
Sebulon's Avatar
Sebulon Sebulon is offline
Member
 
Join Date: Nov 2010
Location: Uppsala, Sweden
Posts: 558
Thanks: 24
Thanked 93 Times in 78 Posts
Default

Quote:
Originally Posted by gkontos View Post
I was not referring to you nor to compression. I simply pointed out that SAS drives are much faster than SATA.
Let me just point out to you that the topic discussed here is:
"Space overhead is much higher on ashift=12 raidz"

I´m not trying to be rude or anything. It´s just that your comment had absolutely nothing to do with the subject. If you have a point, please explain further how that correlates to the subject. Would SAS drives somehow have a smaller space overhead than SATA with ashift=12?

/Sebulon
Reply With Quote
  #15  
Old August 24th, 2012, 16:48
gkontos's Avatar
gkontos gkontos is offline
Senior Member
 
Join Date: Dec 2009
Location: Polidendri, GR
Posts: 1,263
Thanks: 42
Thanked 218 Times in 164 Posts
Default

Quote:
Originally Posted by Sebulon View Post
Let me just point out to you that the topic discussed here is:
"Space overhead is much higher on ashift=12 raidz"

I´m not trying to be rude or anything. It´s just that your comment had absolutely nothing to do with the subject. If you have a point, please explain further how that correlates to the subject. Would SAS drives somehow have a smaller space overhead than SATA with ashift=12?

/Sebulon
The answer regarding the overhead is here.

My later comment regarding SAS drives has to do with the fact that SAS drives will have better performance with ASHIFT=9 without the overhead.

Is that clear enough for you now?
__________________
Powered by BareBSD
Reply With Quote
  #16  
Old August 24th, 2012, 17:34
Sebulon's Avatar
Sebulon Sebulon is offline
Member
 
Join Date: Nov 2010
Location: Uppsala, Sweden
Posts: 558
Thanks: 24
Thanked 93 Times in 78 Posts
Default

Quote:
Originally Posted by gkontos View Post
The answer regarding the overhead is here.

My later comment regarding SAS drives has to do with the fact that SAS drives will have better performance with ASHIFT=9 without the overhead.

Is that clear enough for you now?
Yes, and I'm sorry, I totally missed that post! That was the missing piece

/Sebulon
Reply With Quote
  #17  
Old August 24th, 2012, 17:42
gkontos's Avatar
gkontos gkontos is offline
Senior Member
 
Join Date: Dec 2009
Location: Polidendri, GR
Posts: 1,263
Thanks: 42
Thanked 218 Times in 164 Posts
Default

Quote:
Originally Posted by Sebulon View Post
Yes, and I'm sorry, I totally missed that post! That was the missing piece

/Sebulon
__________________
Powered by BareBSD
Reply With Quote
  #18  
Old October 12th, 2012, 03:22
belon_cfy belon_cfy is offline
Member
 
Join Date: Feb 2012
Posts: 100
Thanks: 7
Thanked 1 Time in 1 Post
Default

How about switching all the HDD to Seagate with smart align technology adopted so that I can maintain the same 512 block size but without sacrifice additional disk space and performance. Running raidz2 on 4k drive natively really waste more than double of space in my scenario.

Anyway , will try to benchmark once i got it to see what is the performance impact.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using labels overhead? or something else fgordon General 4 May 30th, 2012 18:23
[Solved] ZFS raidz space garig0 Storage 8 January 26th, 2012 14:16
Can't boot from ZFS on 8.2-STABLE with ashift=12 mainland General 1 July 22nd, 2011 07:33
Jail performance overhead kniveton Web & Network Services 4 July 4th, 2010 22:33
Adding a new raidz to zpool does not give zfs create more space audunfr Installing & Upgrading 0 April 19th, 2009 12:39


All times are GMT +1. The time now is 21:12.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0