First off, "without any FS usage" is not as cut-and-dry as you might expect. You may not access the file system yourself, but the moment you mount something on OS X, the operating system can throw a lot at the file system. Try mounting the "hello" file system in debug mode-- the trivial read-only file system example with the only contents being a single file. You will see *dozens* of file system requests right away--coming from the Finder and other system components. So, there *is* usage.
When you run MacFUSE in multithreaded mode, it will create as many threads as it needs to service requests concurrently. When requests are done, MacFUSE *will* terminate threads, but will keep a pool of 10 idle threads. That's the built-in idle thread limit. That's what you are seeing. Are you worried about the additional memory footprint of 10 idle threads? Is this a theoretical concern or have you actually quantified the "overhead" and find it to be unacceptable? What kind of environment are you targeting? Given the typical file system access patterns on OS X (many rapid-fire consecutive accesses from Finder & Co.), do you really want to be creating and destroying threads on pretty much every request? Amit PS: MacFUSE is entirely open source, so if you have such developer- oriented questions, you're also encouraged to look at the source. That's always the best documentation. On Oct 14, 4:06 pm, David Zhao <[EMAIL PROTECTED]> wrote: > How does mac fuse determine when to allocate more threads for the > threadpool? It seems like my file system is allocating ~10 threads > when it's first mounted, even without any FS usage. > > Is there a way to control the size of the thread pool? I couldn't find > anything in the options documentation. I want my application to have > minimal memory footprint on the user's machine. Preferably, when the > user is not interacting with the file system, I want to maintain only > a couple of threads, and allocate more when the filesystem is being > used. > > Any pointer is appreciated. > > -David --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MacFUSE" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/macfuse?hl=en -~----------~----~----~----~------~----~------~--~---
