[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fuse-devel
Subject:    [fuse-devel] fuse stat performance on multicore systems
From:       Stefan Westerfeld <stefan () space ! twc ! de>
Date:       2012-06-13 14:52:55
Message-ID: 20120613145255.GA14893 () space ! twc ! de
[Download RAW message or body]

   Hi!

I've just spent some time measuring the performance of my FuSE filesystem
in combination with

rsync -a <network_sourcedir> <my_fuse_fs>

where all files are already known. So what happens is that rsync simply
calls stat/readdir once for the whole tree, and no data needs to be
copied. This is a lot slower than with ext4. To simulate this workload,
I simply used

rsync -a <my_fuse_fs>  # <- only lists files, no syncing done

on a collection of ~20000 files, and compared that to the same task
with ext4. I also used a simplistic FuSE filesystem which simply
delegates all work to an underlying ext4 directory.

My System:
==========
AMD Athlon(tm) 64 X2 Dual Core Processor 6400+

Results 2 Cores:
========================================
Test on ext4              0.632 seconds
Test on simple FuSE fs    4.314 seconds
Test on my fs             5.025 seconds

I know from experince that context switches between threads on different
CPUs tend to be expensive. So I reran the tests after booting with
maxcpus=1.

Results Single Core:
========================================
Test on ext4              1.034 seconds
Test on simple FuSE fs    1.586 seconds
Test on my fs             2.041 seconds

So it seems that FuSE becomes really slow for stat/readdir when more than
one CPU is available (probably because the userspace client and filesystem
work ends up being done on different CPUs).

Maybe FuSE could create two filesystem threads, one for each CPU (with cpu
affinity set to that CPU), and dependant on which CPU the userspace process
runs on choose the right thread to do the work? Or some similar scheme
which takes into account that context switches and data exchange between
cores is likely to be slower than if the work is done on one core only.

   Cu... Stefan
-- 
Stefan Westerfeld, Hamburg/Germany, http://space.twc.de/~stefan

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
fuse-devel mailing list
fuse-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fuse-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic