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

List:       fuse-devel
Subject:    Re: [fuse-devel] stat performance on multicore systems: measurements
From:       Stefan Westerfeld <stefan () space ! twc ! de>
Date:       2012-07-26 13:04:54
Message-ID: 20120726130454.GA6108 () space ! twc ! de
[Download RAW message or body]

   Hi!

On Wed, Jul 25, 2012 at 01:02:18PM -0700, Han-Wen Nienhuys wrote:
> On Wed, Jul 25, 2012 at 10:48 AM, Stefan Westerfeld <stefan@space.twc.de> wrote:
> > On Wed, Jul 25, 2012 at 10:24:04AM -0700, Han-Wen Nienhuys wrote:
> >> On Wed, Jul 25, 2012 at 9:12 AM, Stefan Westerfeld <stefan@space.twc.de> wrote:
> >>
> >> >> Similar results here:
> >> >>
> >> >> [...]
> >> >>
> >> >> Implementing this in FUSE seems like a worthwhile optimization point.
> >> >
> >> > Ok, I'll try to create a patch against FUSE to get this speedup.
> >> >
> >>
> >> What will happen if the FS is accessed from multiple processes running
> >> on different CPUs?
> >
> > The way I think it should work is that the FUSE fs will have different worker
> > threads which are bound to one cpu per thread. If two processes running on cpu
> > 1 and 3 access the filesystem, FUSE should use a worker thread bound to cpu 1
> > to process requests from the userspace process running on cpu 1 and another
> > worker thread bound to cpu 3 to process requests from the userspace process
> > running on cpu 3.
> 
> This will perform poorly: the fuse library has a critical section
> protected by mutexes, which are taken for each request. (see
> fuse_loop_mt.c). If you make those run on different cpus, you will
> have cache line bouncing for each request.

This may be true, but I still think that the benefits from processing the
request on the same cpu the userspace process is running on would be so big
that this locking problem is not so bad. In other words: I think it would still
be faster than before.

However, the proper way to find out is to benchmark the old code against the
new code; predicting performance issues is often not too reliable.

   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