Skip to contentSkip to conversation

POHMELFS high performance network filesystem. IPv6 support, documentation update.

PATCH In review Evgeniy Polyakov 2 participants 6 messages Jul 25, 2008

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

cover POHMELFS high performance network filesystem. IPv6 support, documentation update.

Hi.

I'm pleased to announce POHMEL high performance network parallel distributed filesystem. POHMELFS stands for Parallel Optimized Host Message Exchange Layered File System.

Development status can be tracked in filesystem section [1].

This is a high performance network filesystem with local coherent cache of data and metadata. Its main goal is distributed parallel processing of data. System supports strong transaction model with failover recovery, allows to encrypt/hash whole data channel and perform read load balancing and write to multiple servers in parallel.

This release was fully made by external developers.
Great thanks to Adam Langley <[email protected]> for his documentation update and Varun Chandramohan <[email protected]> for the server IPv6 support.

Currenyly work is being concentrated on the distributed facilities of the POHMELFS [6].

Short changelog:
* Documentation update by Adam Langley <[email protected]>, short notes after talk with Pavel Machek.
* server and configuration utility IPv6 support (kernel part works without changes)

Basic POHMELFS features:
* Local coherent (notes [2]) cache for data and metadata).
* Completely async processing of all events (hard and symlinks are the only exceptions) including object creation and data reading/writing.
* Flexible object architecture optimized for network processing. Ability to create long pathes to object and remove arbitrary huge directoris in single network command.
* High performance is one of the main design goals.
* Very fast and scalable multithreaded userspace server. Being in userspace it works with any underlying filesystem and still is much faster than async ni-kernel NFS one.
* Client is able to switch between different servers (if one goes down, client automatically reconnects to second and so on).
* Transactions support. Full failover for all operations. Resending transactions to different servers on timeout or error.
* Strong encryption and/or hashing of the data channel with autoconfiguration of the server/client supported crypto algorithms.

Roadmap includes:
* Server redundancy extensions (ability to store data in multiple locations

	according to regexp rules, like '*.txt' in /root1 and '*.jpg' in /root1
	and /root2.

* Async writing of the data from receiving kernel thread into userspace pages via copy_to_user() (check development tracking blog for results).
* Client dynamical server reconfiguration: ability to add/remove servers from working set by server command (as part of development distributed server facilities).
* Generic parallel distributed server algorithms.

One can grab sources from archive or git [2] or check homepage [3].

Thank you.

1. POHMELFS development status.
http://tservice.net.ru/~s0mbre/blog/devel/fs/index.html

2. Source archive.
http://tservice.net.ru/~s0mbre/archive/pohmelfs/
Git tree.
http://tservice.net.ru/~s0mbre/archive/pohmelfs/pohmelfs.git/

3. POHMELFS homepage.
http://tservice.net.ru/~s0mbre/old/?section=projects&item=pohmelfs

4. POHMELFS vs NFS benchmark [iozone results are coming]. Plain async NFS vs sha1+cbc(aes) POHMELFS
http://tservice.net.ru/~s0mbre/blog/devel/fs/2008_07_07.html
Plain filesystems.
http://tservice.net.ru/~s0mbre/blog/devel/fs/2008_06_25.html

5. Cache-coherency notes.
http://tservice.net.ru/~s0mbre/blog/devel/fs/2008_05_17.html

6. Distributed POHMELFS design notes.
http://tservice.net.ru/~s0mbre/blog/devel/fs/2008_07_22.html

Signature · 1 line
	Evgeniy Polyakov
#1 lore raw

PATCH 1/3 POHMELFS high performance network filesystem. Documentation.

Documentation bits.

Documentation/filesystems/pohmelfs/design_notes.txt new file +72 -0
new file mode 100644
index 0000000..365d345
@@ -0,0 +1,72 @@
+POHMELFS: Parallel Optimized Host Message Exchange Layered File System.
+
+		Evgeniy Polyakov <[email protected]>
+
+Homepage: http://tservice.net.ru/~s0mbre/old/?section=projects&item=pohmelfs
+
+POHMELFS first began as a network filesystem with coherent local data and
+metadata caches but is now evolving into a parallel distributed filesystem.
+
+Main features of this FS include:
+ * Locally coherent (notes cache for data and metadata:
+ 	http://tservice.net.ru/~s0mbre/blog/devel/fs/2008_05_17.html)
+ * Completely async processing of all events except hard, symlinks and rename events.
+	Object creation and data reading and writing are processed asynchronously.
+ * Flexible object architecture optimized for network processing.
+        Ability to create long paths to objects and remove arbitrarily huge
+        directories with a single network command.
+        (like removing the whole kernel tree via a single network command).
+ * Very high performance.
+ * Fast and scalable multithreaded userspace server. Being in userspace it works
+ 	with any underlying filesystem and still is much faster than async in-kernel NFS one.
+ * Client is able to switch between different servers (if one goes down, client
+ 	automatically reconnects to second and so on).
+ * Transactions support. Full failover for all operations.
+ 	Resending transactions to different servers on timeout or error.
+ * Read request (data read, directory listing, lookup requests) balancing between multiple servers.
+ * Write requests are replicated to multiple servers and completed only when all of them are acked.
+ * Ability to add and/or remove servers from the working set at run-time from userspace (via
+	netlink, so the same command could be processed from a real network. However, since
+	the server does not support it yet, I dropped the network part).
+
+POHMELFS is based on transactions, which are potentially long-standing objects that live
+in the client's memory. Each transaction contains all the information needed to process a given
+command (or set of commands, which is frequently used during data writing: single transactions
+can contain creation and data writing commands). Transactions are committed by all the servers
+to which they are sent and, in case of failures, are eventually resent or dropped with an error.
+For example, reading will return error if no servers are available.
+
+POHMELFS uses a novel asynchronous approach to data processing. Courtesy of transactions, it is
+possible to detach replies from requests and, if the command requires data to be received, the
+caller sleeps waiting for it. Thus, it is possible to issue multiple read commands to different
+servers and async threads will pickup replies in parallel, find appropriate transactions in the
+system and put the data where it belongs (like the page or inode cache).
+
+The main feature of POHMELFS is writeback data and the metadata cache.
+Only a few non-performance critical operations use the write-through cache and
+are synchronous: hard and symbolic link creation, and object rename. Creation
+and removal of objects, as long as writing, are asynchronous and are sent to
+the server during system writeback.  When the server receives a request for
+a given object in the system (such as data reading or file creation), it stores
+appropriate client information in its own cache, so that subsequent mutation
+requests from a different client cause all caching clients to be notified. For
+example, when several clients read data from a file and then a new client
+writes to it, the appropriate pages on the clients will be invalidated:
+subsequent writes will thus force them to reread the page from the server.
+Because of this feature, POHMELFS is extremely fast at metadata intensive
+workloads and can fully utilize the bandwidth to the servers when doing bulk
+data transfers.
+
+POHMELFS clients operate with a working set of servers and are capable of balancing read-only
+operations (like lookups or directory listings) between them.
+Administrators can add or remove servers from the set at run-time via special commands (described
+in Documentation/pohmelfs/info.txt file). Writes are replicated to all servers.
+
+POHMELFS is capable of full data channel encryption and/or strong crypto hashing.
+One can select any kernel supported cipher, encryption mode, hash type and operation mode
+(hmac or digest). It is also possible to use both or neither (default). Crypto configuration
+is checked during mount time and, if the server does not support it, appropriate capabilities
+will be disabled or mount will fail (if 'crypto_fail_unsupported' mount option is specified).
+Crypto performance heavily depends on the number of crypto threads, which asynchronously perform
+crypto operations and send the resulting data to server or submit it up the stack. This number
+can be controlled via a mount option.
Documentation/filesystems/pohmelfs/info.txt new file +81 -0

81 lines not on this page · raw message

Documentation/filesystems/pohmelfs/network_protocol.txt new file +222 -0

222 lines not on this page · raw message

Signature · 1 line
	Evgeniy Polyakov
#2 lore raw

PATCH 2/3 POHMELFS high performance network filesystem. VFS changes.

In reply to Evgeniy Polyakov

Trivial VFS changes.

mm/filemap.c +2 -0
index 07e9d92..57beb4b 100644
@@ -495,6 +495,7 @@ int add_to_page_cache_lru(struct page *page, struct address_space *mapping,
 		lru_cache_add(page);
 	return ret;
 }
+EXPORT_SYMBOL_GPL(add_to_page_cache_lru);
 
 #ifdef CONFIG_NUMA
 struct page *__page_cache_alloc(gfp_t gfp)
@@ -610,6 +611,7 @@ int __lock_page_killable(struct page *page)
 	return __wait_on_bit_lock(page_waitqueue(page), &wait,
 					sync_page_killable, TASK_KILLABLE);
 }
+EXPORT_SYMBOL_GPL(__lock_page_killable);
 
 /**
  * __lock_page_nosync - get a lock on the page, without calling sync_page()
Signature · 1 line
	Evgeniy Polyakov
#3 lore raw

PATCH 3/3 POHMELFS high performance network filesystem. POHMELFS core.

In reply to Evgeniy Polyakov

Core POHMELFS functionality.

fs/Kconfig +2 -0
index c509123..59935cd 100644
@@ -1566,6 +1566,8 @@ menuconfig NETWORK_FILESYSTEMS
 
 if NETWORK_FILESYSTEMS
 
+source "fs/pohmelfs/Kconfig"
+
 config NFS_FS
 	tristate "NFS file system support"
 	depends on INET
fs/Makefile +1 -0
index 1e7a11b..6ce6a35 100644
@@ -119,3 +119,4 @@ obj-$(CONFIG_HPPFS)		+= hppfs/
 obj-$(CONFIG_DEBUG_FS)		+= debugfs/
 obj-$(CONFIG_OCFS2_FS)		+= ocfs2/
 obj-$(CONFIG_GFS2_FS)           += gfs2/
+obj-$(CONFIG_POHMELFS)		+= pohmelfs/
fs/pohmelfs/Kconfig new file +33 -0
new file mode 100644
index 0000000..61f66b0
@@ -0,0 +1,33 @@
+config POHMELFS
+	tristate "POHMELFS filesystem support"
+	select CONNECTOR
+	help
+	  POHMELFS stands for Parallel Optimized Host Message Exchange Layered File System.
+	  This is a network filesystem which supports coherent caching of data and metadata
+	  on clients.
+
+config POHMELFS_DEBUG
+	bool "POHMELFS debugging"
+	depends on POHMELFS
+	default n
+	help
+	  Turns on excessive POHMELFS debugging facilities.
+	  You usually do not want to slow things down noticebly and get really lots of kernel
+	  messages in syslog.
+
+config POHMELFS_CC_GROUP
+	bool "POHMELFS cache coherency protocol"
+	depends on POHMELFS
+	default y
+	help
+	  This allows to broadcast data and metadata cache coherency messages between clients.
+	  Usually you want this facility, although without locking you can get different from
+	  POSIX expectation behaviour. For more details check POHMELFS homepage and development
+	  section.
+
+config POHMELFS_CRYPTO
+	bool "POHMELFS crypto support"
+	depends on CONFIG_CRYPTO_BLKCIPHER && CONFIG_CRYPTO_HASH
+	help
+	  This option allows to encrypt and/or protect with strong cryptographic hash all dataflow
+	  between server and clients. Each config group can have own keys.
fs/pohmelfs/Makefile new file +3 -0
new file mode 100644
index 0000000..1d1325b
@@ -0,0 +1,3 @@
+obj-$(CONFIG_POHMELFS)	+= pohmelfs.o
+
+pohmelfs-y := inode.o config.o dir.o net.o path_entry.o trans.o crypto.o
fs/pohmelfs/config.c new file +393 -0

393 lines not on this page · raw message

fs/pohmelfs/crypto.c new file +862 -0

862 lines not on this page · raw message

fs/pohmelfs/dir.c new file +1180 -0

1,180 lines not on this page · raw message

fs/pohmelfs/inode.c new file +1712 -0

517 lines not on this page · raw message

fs/pohmelfs/net.c new file +1059 -0

1,059 lines not on this page · raw message

fs/pohmelfs/netfs.h new file +794 -0

794 lines not on this page · raw message

fs/pohmelfs/path_entry.c new file +356 -0

356 lines not on this page · raw message

fs/pohmelfs/trans.c new file +719 -0

719 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
	Evgeniy Polyakov

Part of the diff is not shown here. View the raw message.

#4 lore raw
In reply to Evgeniy Polyakov
Quoted 6 lines

From the design notes,
POHMELFS got full data and metadata cache coherency support.

It was rather simple task due to async event processing support.

Quoted 10 lines

Each time client creates, reads or writes object to server, information about its interest is stored on server. When any other client updates the same object (like changing attributes or writes data), all interested clients get notifications with new data (new attributes, or in case of writing possibly new size and flag, which page has to be fetched from the server, since it is not valid anymore). Writing happens during writeback as before, so commands like "echo Some_message > /mnt/file" immediately syncs size of the file to zero and after some time writes there actual data, when system will decide to start writeback.

I'm just going by what the notes say, which don't seem very clear.

Consider this:

1. Client A reads FILE, and registers its interest in FILE. (Contents are not interesting, e.g. 'Hello_sister')
2. Client B does "echo Some_message > /mnt/file".
- Truncates the file, sending truncate message to server.
- "Writing happes during writeback"...?
3. Client B sends a message by back-channel to client A (e.g. ssh command).
4. Client A reads FILE again.

Does client A always see 'Some_message' when it reads the file in step 4? That's what I'd call coherence.

For that, the first truncate or write operation on client B must wait until a synchronous invalidate request goes to the server, then the server sends to all interested clients (A) and waits for a reply, then reply to B, and only then can B return from the open()/write() system call.

And when client A reads the file in step 4, it must send a synchronous message to the server which must ask B to write the delayed writeback data immediately, and until then, the reply to A will be delayed.

Is that right?

Thanks,
-- Jamie

#5 lore raw

Hi Jamie.

Quoted 10 lines · Jamie Lokier

Consider this:

1. Client A reads FILE, and registers its interest in FILE. (Contents are not interesting, e.g. 'Hello_sister')
2. Client B does "echo Some_message > /mnt/file".
- Truncates the file, sending truncate message to server.
- "Writing happes during writeback"...?
3. Client B sends a message by back-channel to client A (e.g. ssh command).
4. Client A reads FILE again.

Quoted 2 lines

Does client A always see 'Some_message' when it reads the file in step 4? That's what I'd call coherence.

If 4. happens after writeback of the client B, then it will see the new content, otherwise it will see empty page. There are no locks (even implicit like what is expected in POSIX in exactly this case) in POHMELFS so far.

Quoted 10 lines

For that, the first truncate or write operation on client B must wait until a synchronous invalidate request goes to the server, then the server sends to all interested clients (A) and waits for a reply, then reply to B, and only then can B return from the open()/write() system call.

And when client A reads the file in step 4, it must send a synchronous message to the server which must ask B to write the delayed writeback data immediately, and until then, the reply to A will be delayed.

Is that right?

It _can_ be done that way. But I'm still thinking on how the really scalable locking (this is a locking mechanism, just implicit) should be implemented. It is possible to send a message on every write_begin, which will invalidate appropriate message and every _read_ from that area will require all writers to flush theirs data. It will be kind of ME(O)SI cache coherency CPU protocol. It is simple task in current design, but I'm not yet convinced myself that this is a really scalable approach. So, there are no locks in POHMELFS _yet_.

Signature · 1 line
	Evgeniy Polyakov