in reply to Fuse / Fuse::Simple write_buffer issues

The problem is that the writes are being done in 4096 blocks
(...)
Which tells me that perl it's self has set the 4096 from somewhere else

Not really sure, but maybe your problem has to do with PerlIO having a fixed buffer size of 4k (hardcoded in the Perl source).  See Re: 4k read buffer is too small.

  • Comment on Re: Fuse / Fuse::Simple write_buffer issues

Replies are listed 'Best First'.
Re^2: Fuse / Fuse::Simple write_buffer issues
by jamescondron (Initiate) on Mar 25, 2010 at 12:05 UTC

    As far as I can see, everything in Fuse is being done by passing hashrefs about, I don't know the hash underlying structure well enough to say for sure, but I shouldn't think it uses the same IO model.

    That being said, this is testable by going into the perl source, I just don't really want to have to if I can help it

      That being said, this is testable ...

      If you post a little (but self-contained) snippet that shows how you tested that writes are being done in 4k blocks, I might run it with my 8k buffer perl I compiled back then, which I still have around.

      Update: ...unfortunately, I couldn't get Fuse to work (with a reasonable amount of effort) on my somewhat older SUSE system at work — module builds fine, but tests fail, although kernel-wise, etc. fuse is in principle working.  I'll see what I can do later at home on my Ubuntu system.

        The problem with posting it is that there is rather a lot, and Fuse requires a lot of implemented subroutines for writing (reads, exists, unique and so on) so if you don't mind it'd be a lot easier for me to just give you a tarball (http://www.jamescondron.co.uk/steg.tar.bz2) of the entire implementation (8k).
        To test I used dd and watched the debug output from the script (fs_simple.pl). Invocation:
        perl ./fs_simple.pl <mountpoint>