design_notes.txt 4.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. POHMELFS: Parallel Optimized Host Message Exchange Layered File System.
  2. Evgeniy Polyakov <zbr@ioremap.net>
  3. Homepage: http://www.ioremap.net/projects/pohmelfs
  4. POHMELFS first began as a network filesystem with coherent local data and
  5. metadata caches but is now evolving into a parallel distributed filesystem.
  6. Main features of this FS include:
  7. * Locally coherent cache for data and metadata with (potentially) byte-range locks.
  8. Since all Linux filesystems lock the whole inode during writing, algorithm
  9. is very simple and does not use byte-ranges, although they are sent in
  10. locking messages.
  11. * Completely async processing of all events except creation of hard and symbolic
  12. links, and rename events.
  13. Object creation and data reading and writing are processed asynchronously.
  14. * Flexible object architecture optimized for network processing.
  15. Ability to create long paths to objects and remove arbitrarily huge
  16. directories with a single network command.
  17. (like removing the whole kernel tree via a single network command).
  18. * Very high performance.
  19. * Fast and scalable multithreaded userspace server. Being in userspace it works
  20. with any underlying filesystem and still is much faster than async in-kernel NFS one.
  21. * Client is able to switch between different servers (if one goes down, client
  22. automatically reconnects to second and so on).
  23. * Transactions support. Full failover for all operations.
  24. Resending transactions to different servers on timeout or error.
  25. * Read request (data read, directory listing, lookup requests) balancing between multiple servers.
  26. * Write requests are replicated to multiple servers and completed only when all of them are acked.
  27. * Ability to add and/or remove servers from the working set at run-time.
  28. * Strong authentication and possible data encryption in network channel.
  29. * Extended attributes support.
  30. POHMELFS is based on transactions, which are potentially long-standing objects that live
  31. in the client's memory. Each transaction contains all the information needed to process a given
  32. command (or set of commands, which is frequently used during data writing: single transactions
  33. can contain creation and data writing commands). Transactions are committed by all the servers
  34. to which they are sent and, in case of failures, are eventually resent or dropped with an error.
  35. For example, reading will return an error if no servers are available.
  36. POHMELFS uses a asynchronous approach to data processing. Courtesy of transactions, it is
  37. possible to detach replies from requests and, if the command requires data to be received, the
  38. caller sleeps waiting for it. Thus, it is possible to issue multiple read commands to different
  39. servers and async threads will pick up replies in parallel, find appropriate transactions in the
  40. system and put the data where it belongs (like the page or inode cache).
  41. The main feature of POHMELFS is writeback data and the metadata cache.
  42. Only a few non-performance critical operations use the write-through cache and
  43. are synchronous: hard and symbolic link creation, and object rename. Creation,
  44. removal of objects and data writing are asynchronous and are sent to
  45. the server during system writeback. Only one writer at a time is allowed for any
  46. given inode, which is guarded by an appropriate locking protocol.
  47. Because of this feature, POHMELFS is extremely fast at metadata intensive
  48. workloads and can fully utilize the bandwidth to the servers when doing bulk
  49. data transfers.
  50. POHMELFS clients operate with a working set of servers and are capable of balancing read-only
  51. operations (like lookups or directory listings) between them according to IO priorities.
  52. Administrators can add or remove servers from the set at run-time via special commands (described
  53. in Documentation/filesystems/pohmelfs/info.txt file). Writes are replicated to all servers, which
  54. are connected with write permission turned on. IO priority and permissions can be changed in
  55. run-time.
  56. POHMELFS is capable of full data channel encryption and/or strong crypto hashing.
  57. One can select any kernel supported cipher, encryption mode, hash type and operation mode
  58. (hmac or digest). It is also possible to use both or neither (default). Crypto configuration
  59. is checked during mount time and, if the server does not support it, appropriate capabilities
  60. will be disabled or mount will fail (if 'crypto_fail_unsupported' mount option is specified).
  61. Crypto performance heavily depends on the number of crypto threads, which asynchronously perform
  62. crypto operations and send the resulting data to server or submit it up the stack. This number
  63. can be controlled via a mount option.