or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/pyfuse3@3.4.x

docs

index.md
tile.json

tessl/pypi-pyfuse3

tessl install tessl/pypi-pyfuse3@3.4.0

Python 3 bindings for libfuse 3 with async I/O support

performance-tuning.mddocs/guides/

Performance Tuning Guide

Optimize pyfuse3 filesystem performance for different workloads.

Worker Task Configuration

Guidelines by Workload

# Low concurrency (single user, sequential)
await pyfuse3.main(min_tasks=1, max_tasks=10)

# Medium concurrency (typical multi-user)
await pyfuse3.main(min_tasks=5, max_tasks=50)

# High concurrency (servers, many clients)
await pyfuse3.main(min_tasks=10, max_tasks=200)

# I/O-bound (network filesystems)
await pyfuse3.main(min_tasks=10, max_tasks=100)

# CPU-bound (compression, encryption)
await pyfuse3.main(min_tasks=2, max_tasks=20)

Cache Tuning

Entry and Attribute Timeouts

# Fast-changing data
entry.entry_timeout = 0.1
entry.attr_timeout = 0.1

# Stable data
entry.entry_timeout = 300.0
entry.attr_timeout = 300.0

# Immutable data
entry.entry_timeout = float('inf')
entry.attr_timeout = float('inf')

# No caching
entry.entry_timeout = 0
entry.attr_timeout = 0

Writeback Caching

class FastFS(pyfuse3.Operations):
    enable_writeback_cache = True  # Better write performance
    
    async def flush(self, fh):
        """Required with writeback cache."""
        await self._flush_to_storage(fh)
    
    async def fsync(self, fh, datasync):
        """Required with writeback cache."""
        await self._sync_to_storage(fh, datasync)

Direct I/O

async def open(self, inode, flags, ctx):
    """Use direct I/O for volatile files."""
    if self._is_volatile(inode):
        return pyfuse3.FileInfo(fh=fh, direct_io=True)
    return pyfuse3.FileInfo(fh=fh, direct_io=False)

See Also

  • Quick Start Guide
  • Initialization Reference