ceph-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* xattr limits
@ 2013-10-03 23:21 David Zafman
       [not found] ` <524E59FC.9030903@dachary.org>
  0 siblings, 1 reply; 3+ messages in thread
From: David Zafman @ 2013-10-03 23:21 UTC (permalink / raw)
  To: ceph-devel@vger.kernel.org


I want to record with the ceph-devel archive results from testing limits of xattrs for Linux filesystems used with Ceph.

Script that creates xattrs with name user.test1, user.test2, …. on a single file
3.10 linux kernel

ext4  
value bytes       number of entries
    1               148
   16             103
  256          14
  512            7
  1024         3
4036          1 
Beyond this immediately get ENOSPC

btrfs    
value bytes       number of entries
 8       		 10k
16       		10k
32        		 10k
64        		 10k
128     		 10k
256       		 10k
512        		10k  slow but worked 1,000,000 got completely hung for minutes at a time during removal strace showed no forward progress
1024        	 10k
2048        	 10k
 3096          	 10k
Beyond this you start getting ENOSPC after fewer entries

xfs (limit entries due to xfs crash with 10k entries)
value bytes       number of entries
1   			1k
8   			 1k
16   			 1k
32  			 1k
64   		        1k
128   		 1k
256 			1k
512  		 1k
1024 		1k
2048  		 1k
4096   		 1k
8192   		 1k
16384   		 1k
32768   		 1k
65536   		 1k

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: xattr limits
       [not found] ` <524E59FC.9030903@dachary.org>
@ 2013-10-04  6:54   ` David Zafman
  2013-10-04 11:16     ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: David Zafman @ 2013-10-04  6:54 UTC (permalink / raw)
  To: ceph-devel@vger.kernel.org; +Cc: Loic Dachary

[-- Attachment #1: Type: text/plain, Size: 27 bytes --]


Here is the test script:


[-- Attachment #2: xattr-test.sh --]
[-- Type: application/octet-stream, Size: 1825 bytes --]

#! /bin/sh

#getfattr format
#
# # file: foo
# user.test="test"

if [ $# != "2" ];
then
  echo usage: $0 path count
  exit 1
fi

FILENAME=$1
COUNT=$2

rmdir $FILENAME > /dev/null 2>&1

datalen=65536
echo "datadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadatadata" > tmp.$$
while test $datalen != 0
do
  dd if=tmp.$$ of=src.$$ bs=512 count=1 conv=notrunc oflag=append 2> /dev/null
  datalen=`expr $datalen - 512`
done
rm tmp.$$

for len in 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536
do
  mkdir $FILENAME

  echo $len

  count=0
  while test $count != $COUNT
  do
    entry=user.test`expr $count + 1`
    echo "# file: $FILENAME" > data.$$
    echo -n "$entry" >> data.$$
    echo -n '="' >> data.$$
    dd if=src.$$ of=data.$$ bs=$len count=1 conv=notrunc oflag=append 2> /dev/null
    echo '"' >> data.$$
    #cat data.$$
    #read a
    setfattr --restore=data.$$
    if [ $? != "0" ];
    then
        echo failure to set $entry
        break
    fi
    count=`expr $count + 1`
    #getfattr --dump $FILENAME
  done
  rm data.$$
  rmcount=0
  while test $rmcount != $count
  do
    entry=user.test`expr $rmcount + 1`
    setfattr --remove=$entry $FILENAME
    if [ $? != "0" ];
    then
      echo failure to remove $entry
      break
    fi
    rmcount=`expr $rmcount + 1`
  done
  getfattr --dump $FILENAME
  rmdir $FILENAME
done
rm src.$$

exit 0

[-- Attachment #3: Type: text/plain, Size: 1943 bytes --]


David Zafman
Senior Developer
http://www.inktank.com




On Oct 3, 2013, at 11:02 PM, Loic Dachary <loic@dachary.org> wrote:

> Hi David,
> 
> Would you mind attaching the script to the mail for completness ? It's a useful thing to have :-)
> 
> Cheers
> 
> On 04/10/2013 01:21, David Zafman wrote:
>> 
>> I want to record with the ceph-devel archive results from testing limits of xattrs for Linux filesystems used with Ceph.
>> 
>> Script that creates xattrs with name user.test1, user.test2, …. on a single file
>> 3.10 linux kernel
>> 
>> ext4  
>> value bytes       number of entries
>>    1               148
>>   16             103
>>  256          14
>>  512            7
>>  1024         3
>> 4036          1 
>> Beyond this immediately get ENOSPC
>> 
>> btrfs    
>> value bytes       number of entries
>> 8       		 10k
>> 16       		10k
>> 32        		 10k
>> 64        		 10k
>> 128     		 10k
>> 256       		 10k
>> 512        		10k  slow but worked 1,000,000 got completely hung for minutes at a time during removal strace showed no forward progress
>> 1024        	 10k
>> 2048        	 10k
>> 3096          	 10k
>> Beyond this you start getting ENOSPC after fewer entries
>> 
>> xfs (limit entries due to xfs crash with 10k entries)
>> value bytes       number of entries
>> 1   			1k
>> 8   			 1k
>> 16   			 1k
>> 32  			 1k
>> 64   		        1k
>> 128   		 1k
>> 256 			1k
>> 512  		 1k
>> 1024 		1k
>> 2048  		 1k
>> 4096   		 1k
>> 8192   		 1k
>> 16384   		 1k
>> 32768   		 1k
>> 65536   		 1k
>> 
>> --
>> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>> 
> 
> -- 
> Loïc Dachary, Artisan Logiciel Libre
> All that is necessary for the triumph of evil is that good people do nothing.
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: xattr limits
  2013-10-04  6:54   ` David Zafman
@ 2013-10-04 11:16     ` Christoph Hellwig
  0 siblings, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2013-10-04 11:16 UTC (permalink / raw)
  To: David Zafman; +Cc: ceph-devel@vger.kernel.org, Loic Dachary, xfs

Might be good to send the crash report to the XFS list..

On Thu, Oct 03, 2013 at 11:54:29PM -0700, David Zafman wrote:
> 
> Here is the test script:
> 


> 
> David Zafman
> Senior Developer
> http://www.inktank.com
> 
> 
> 
> 
> On Oct 3, 2013, at 11:02 PM, Loic Dachary <loic@dachary.org> wrote:
> 
> > Hi David,
> > 
> > Would you mind attaching the script to the mail for completness ? It's a useful thing to have :-)
> > 
> > Cheers
> > 
> > On 04/10/2013 01:21, David Zafman wrote:
> >> 
> >> I want to record with the ceph-devel archive results from testing limits of xattrs for Linux filesystems used with Ceph.
> >> 
> >> Script that creates xattrs with name user.test1, user.test2, ?. on a single file
> >> 3.10 linux kernel
> >> 
> >> ext4  
> >> value bytes       number of entries
> >>    1               148
> >>   16             103
> >>  256          14
> >>  512            7
> >>  1024         3
> >> 4036          1 
> >> Beyond this immediately get ENOSPC
> >> 
> >> btrfs    
> >> value bytes       number of entries
> >> 8       		 10k
> >> 16       		10k
> >> 32        		 10k
> >> 64        		 10k
> >> 128     		 10k
> >> 256       		 10k
> >> 512        		10k  slow but worked 1,000,000 got completely hung for minutes at a time during removal strace showed no forward progress
> >> 1024        	 10k
> >> 2048        	 10k
> >> 3096          	 10k
> >> Beyond this you start getting ENOSPC after fewer entries
> >> 
> >> xfs (limit entries due to xfs crash with 10k entries)
> >> value bytes       number of entries
> >> 1   			1k
> >> 8   			 1k
> >> 16   			 1k
> >> 32  			 1k
> >> 64   		        1k
> >> 128   		 1k
> >> 256 			1k
> >> 512  		 1k
> >> 1024 		1k
> >> 2048  		 1k
> >> 4096   		 1k
> >> 8192   		 1k
> >> 16384   		 1k
> >> 32768   		 1k
> >> 65536   		 1k
> >> 
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> >> the body of a message to majordomo@vger.kernel.org
> >> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >> 
> > 
> > -- 
> > Lo?c Dachary, Artisan Logiciel Libre
> > All that is necessary for the triumph of evil is that good people do nothing.
> > 
> 

---end quoted text---

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-10-04 11:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-03 23:21 xattr limits David Zafman
     [not found] ` <524E59FC.9030903@dachary.org>
2013-10-04  6:54   ` David Zafman
2013-10-04 11:16     ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).