{"id":27736,"library":"faster-fifo","title":"faster-fifo","description":"A drop-in replacement for Python's multiprocessing.Queue that uses a shared-memory ring buffer and a POSIX semaphore for lower latency and higher throughput. Version 1.5.2 requires Python >=3.9. Actively maintained.","status":"active","version":"1.5.2","language":"python","source_language":"en","source_url":"https://github.com/alex-sherman/faster-fifo","tags":["multiprocessing","queue","shared-memory","IPC","performance"],"install":[{"cmd":"pip install faster-fifo","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"The main class is named `Queue`, not `faster_fifo_queue`.","wrong":"from faster_fifo import faster_fifo_queue","symbol":"Queue","correct":"from faster_fifo import Queue"},{"note":"Use the faster_fifo Queue to get speed improvements; multiprocessing.Queue is the fallback.","wrong":"from multiprocessing import Queue","symbol":"Queue","correct":"from faster_fifo import Queue"}],"quickstart":{"code":"from faster_fifo import Queue\nimport os\n\nq = Queue()\nq.put('hello')\nmsg = q.get()\nprint(msg)  # hello\n","lang":"python","description":"Create a Queue, put a message, get it back. Works like multiprocessing.Queue but faster."},"warnings":[{"fix":"For very large data, consider serializing to disk and sending a path.","message":"The underlying implementation uses shared memory; do not pass large objects (e.g., >1GB) without testing, as they may cause memory pressure.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `q.get(timeout=0.5)` is not supported; implement your own timeout with a separate thread/process.","message":"faster-fifo Queue is not a drop-in replacement for multiprocessing.Queue in all cases; e.g., it does not support the `timeout` parameter in `get()` (it blocks indefinitely by default).","severity":"gotcha","affected_versions":"<=1.5.2"},{"fix":"Ensure all queued objects are picklable or switch to a different serializer (unsupported).","message":"Objects must be picklable (default serializer is pickle). If you use custom objects that are not picklable, the queue will fail.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Run `pip install faster-fifo --upgrade` in the correct environment.","cause":"The library is not installed, or installed in a different environment.","error":"ModuleNotFoundError: No module named 'faster_fifo'"},{"fix":"Increase /dev/shm size (e.g., mount -o remount,size=2G /dev/shm) or reduce queue/message size.","cause":"Shared memory filesystem (e.g., /dev/shm) is full. Faster-fifo uses POSIX shared memory.","error":"OSError: [Errno 28] No space left on device"},{"fix":"Use `from faster_fifo import Queue` or `from faster_fifo import Queue as FQueue`.","cause":"Importing the module instead of the class: `import faster_fifo` then using `faster_fifo.Queue` is correct, but some users mistakenly do `from faster_fifo import faster_fifo_queue`.","error":"AttributeError: module 'faster_fifo' has no attribute 'Queue'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}