Skip to contentSkip to conversation

POHMELFS high performance network filesystem. First steps in parallel processing.

PATCH In review Evgeniy Polyakov 2 participants 7 messages Jul 7, 2008 – Jul 12, 2008

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

cover POHMELFS high performance network filesystem. First steps in parallel processing.

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 brings following features:
* Strong crypto support. One can specify encryption method (like cbc(aes), hash or digest, or all of them to be performed on whole data channel (except headers). If special mount option is specified, then mount will file if server does not support requested by client crypto options. By defalt that crypto options will be skipped.
* Bug fixes.

Very likely it is one of the last non-bug-fixing release of the kernel client side, next release will incorporate features, needed for distributed parallel data processing (like ability to add new servers via network command from another servers), so most of the work will be devoted to server code.

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

Signature · 1 line
	Evgeniy Polyakov
#1 lore raw

PATCH 1/3 POHMELFS: VFS trivial change.

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
#2 lore raw

PATCH 2/3 POHMELFS: Documentation.

In reply to Evgeniy Polyakov

Design notes, usage cases and protocol description.

Documentation/filesystems/pohmelfs/design_notes.txt new file +70 -0
new file mode 100644
index 0000000..0b20a47
@@ -0,0 +1,70 @@
+POHMELFS: Parallel Optimized Host Message Exchange Layered File System.
+
+		Evgeniy Polyakov <[email protected]>
+
+Homepage: http://tservice.net.ru/~s0mbre/old/?section=projects&item=pohmelfs
+
+It was first started as network filesystem with coherent local data and metadata caches,
+but it is being evolved into parallel distibuted filesystem now.
+
+Main features of this FS include:
+ * Local 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 (hard, symlinks and rename are the
+ 	only exceptions) including object creation and data reading and writing.
+ * Flexible object architecture optimized for network processing.
+ 	Ability to create long pathes to object and remove arbitrary huge
+	directoris in single network command.
+	(like removing the whole kernel tree via 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 requests (data read, directory listing, lookup requests) balancing between multiple servers.
+ * Write requests are sent to multiple servers and completed only when all of them sent an ack.
+ * Ability to add and/or remove servers from working set at run-time from userspace (via netlink,
+ 	so the same command can be processed from real network though, but since server does
+	not support it yet, I dropped network part).
+
+
+POHMELFS is based on transactions, which are potentially long-standing objects, which live
+in clients memory. Each transaction contains all information needed to process given command
+(or set of command, which is frequently used during data writing: single transaction can contain
+creation and data writing commands). Transaction is committed by all servers, where it was sent,
+and in case of failure of one or another, it will be eventually resent or dropped with error,
+so, for example, reading will return error, if no servers are available.
+
+POHMELFS uses novel asynchronous approach of data processing. Courtesy to transactions, it is
+possible to detouch reply from request, and if command requires data to be received, caller
+just sleeps waiting for it. Thus it is possible to issue multiple read commands to different
+servers and async threads will pick replies in parallel, find appropriate transactions in the
+system and put data where it belongs (like page or inode cache).
+
+Main feature of the POHMELFS is writeback data and metadata cache.
+Only few non-performance critical operations use 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 server receives some request for given object in the system (like data reading,
+or file creation or whatever else), it stores appropriate client information in own cache,
+so when subsequent request comes from different client, all previous could be notified
+(for example when several clients read data from file, and then new client writes there,
+appropriate pages on clients will be invalidated, so subsequent write will force them
+to read page from the server). Because of this feature POHMELFS is extremely fast in metadata
+intensive workloads, and can fully utilize bandwidth to servers when doing bulk data transafers.
+
+POHMELFS client operates with working set of servers, and is capable of balancing reading,
+i.e. no modification, like lookup or directory listing, workload between all servers it was conneted to.
+Administrator can add or remove servers from the set in run-time via special command (described
+in Documentation/pohmelfs/info.txt file). Writing is performed to all servers.
+
+POHEMLFS is capable of full data channel encryption and/or strong crypto hashing.
+One can select 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 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 number of crypto threads, which asynchronously perform
+crypto operations and send data to server or submit it higher to the stack. Number of crypto
+threads is controlled via 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 +220 -0

220 lines not on this page · raw message

Signature · 1 line
	Evgeniy Polyakov
#3 lore raw

Re: [2/3] POHMELFS: Documentation.

Hi!

Documentation/filesystems/pohmelfs/design_notes.txt line 14

Quoted 2 lines

+ * Completely async processing of all events (hard, symlinks and rename are the

Documentation/filesystems/pohmelfs/design_notes.txt new file +1 -0
+ 	only exceptions) including object creation and data reading and writing.

Hmm... this is little funny.

Async processing of most events (only exceptions are ...) ?

Quoted 7 lines
Documentation/filesystems/pohmelfs/network_protocol.txt new file +7 -0
+POHMELFS network protocol.
+
+Basic structure used in network communication is following command:
+
+struct netfs_cmd
+{
+	__u16			cmd;	/* Command number */

Documentation/filesystems/pohmelfs/network_protocol.txt line 17

Quoted 10 lines
Documentation/filesystems/pohmelfs/network_protocol.txt new file +10 -0
+	__u16			csize;	/* Attached crypto information size */
+	__u16			cpad;	/* Attached padding size */
+	__u16			ext;	/* External flags */
+	__u32			size;	/* Size of the attached data */
+	__u32			trans;	/* Transaction id */
+	__u64			id;	/* Object ID to operate on. Used for feedback.*/
+	__u64			start;	/* Start of the object. */
+	__u64			iv;	/* IV sequence */
+	__u8			data[0];
+};

Which endianity?

Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#4 lore raw

Re: [2/3] POHMELFS: Documentation.

Hi.

Quoted 6 lines · Pavel Machek

Documentation/filesystems/pohmelfs/design_notes.txt line 14

Quoted 2 lines

+ * Completely async processing of all events (hard, symlinks and rename are the

Documentation/filesystems/pohmelfs/design_notes.txt new file +1 -0
+ 	only exceptions) including object creation and data reading and writing.

Hmm... this is little funny.

Async processing of most events (only exceptions are ...) ?

There are people who belive that most with exceptions is still all :) Actually I think that if there are exceptions, than it is not 'all'.

Quoted 11 lines
Quoted 11 lines
Documentation/filesystems/pohmelfs/network_protocol.txt new file +11 -0
+POHMELFS network protocol.
+
+Basic structure used in network communication is following command:
+
+struct netfs_cmd
+{
+	__u16			cmd;	/* Command number */
+	__u16			csize;	/* Attached crypto information size */
+	__u16			cpad;	/* Attached padding size */
+	__u16			ext;	/* External flags */
+	__u32			size;	/* Size of the attached data */
Quoted 8 lines

Documentation/filesystems/pohmelfs/network_protocol.txt line 17

Quoted 6 lines
Documentation/filesystems/pohmelfs/network_protocol.txt new file +6 -0
+	__u32			trans;	/* Transaction id */
+	__u64			id;	/* Object ID to operate on. Used for feedback.*/
+	__u64			start;	/* Start of the object. */
+	__u64			iv;	/* IV sequence */
+	__u8			data[0];
+};

Which endianity?

Big endian in the network. CPU endian on both ends.

Signature · 1 line
	Evgeniy Polyakov
#5 lore raw

PATCH 3/3 POHMELFS: core files.

In reply to Evgeniy Polyakov

POHMELFS core.

Documentation/filesystems/pohmelfs/design_notes.txt new file +70 -0
new file mode 100644
index 0000000..0b20a47
@@ -0,0 +1,70 @@
+POHMELFS: Parallel Optimized Host Message Exchange Layered File System.
+
+		Evgeniy Polyakov <[email protected]>
+
+Homepage: http://tservice.net.ru/~s0mbre/old/?section=projects&item=pohmelfs
+
+It was first started as network filesystem with coherent local data and metadata caches,
+but it is being evolved into parallel distibuted filesystem now.
+
+Main features of this FS include:
+ * Local 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 (hard, symlinks and rename are the
+ 	only exceptions) including object creation and data reading and writing.
+ * Flexible object architecture optimized for network processing.
+ 	Ability to create long pathes to object and remove arbitrary huge
+	directoris in single network command.
+	(like removing the whole kernel tree via 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 requests (data read, directory listing, lookup requests) balancing between multiple servers.
+ * Write requests are sent to multiple servers and completed only when all of them sent an ack.
+ * Ability to add and/or remove servers from working set at run-time from userspace (via netlink,
+ 	so the same command can be processed from real network though, but since server does
+	not support it yet, I dropped network part).
+
+
+POHMELFS is based on transactions, which are potentially long-standing objects, which live
+in clients memory. Each transaction contains all information needed to process given command
+(or set of command, which is frequently used during data writing: single transaction can contain
+creation and data writing commands). Transaction is committed by all servers, where it was sent,
+and in case of failure of one or another, it will be eventually resent or dropped with error,
+so, for example, reading will return error, if no servers are available.
+
+POHMELFS uses novel asynchronous approach of data processing. Courtesy to transactions, it is
+possible to detouch reply from request, and if command requires data to be received, caller
+just sleeps waiting for it. Thus it is possible to issue multiple read commands to different
+servers and async threads will pick replies in parallel, find appropriate transactions in the
+system and put data where it belongs (like page or inode cache).
+
+Main feature of the POHMELFS is writeback data and metadata cache.
+Only few non-performance critical operations use 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 server receives some request for given object in the system (like data reading,
+or file creation or whatever else), it stores appropriate client information in own cache,
+so when subsequent request comes from different client, all previous could be notified
+(for example when several clients read data from file, and then new client writes there,
+appropriate pages on clients will be invalidated, so subsequent write will force them
+to read page from the server). Because of this feature POHMELFS is extremely fast in metadata
+intensive workloads, and can fully utilize bandwidth to servers when doing bulk data transafers.
+
+POHMELFS client operates with working set of servers, and is capable of balancing reading,
+i.e. no modification, like lookup or directory listing, workload between all servers it was conneted to.
+Administrator can add or remove servers from the set in run-time via special command (described
+in Documentation/pohmelfs/info.txt file). Writing is performed to all servers.
+
+POHEMLFS is capable of full data channel encryption and/or strong crypto hashing.
+One can select 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 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 number of crypto threads, which asynchronously perform
+crypto operations and send data to server or submit it higher to the stack. Number of crypto
+threads is controlled via 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 +220 -0

220 lines not on this page · raw message

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

146 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

mm/filemap.c +2 -0
index 07e9d92..57beb4b 100644

Lines of this file are not shown. View the 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.

#6 lore raw

cover POHMELFS high performance network filesystem. Strong crypto support.

In reply to Evgeniy Polyakov

Subject should be "POHMELFS high performance network filesystem. Strong crypto support."

This release brings ability to encrypt data channel in case of distributed filesystem created on top of uncontrolled channels.

One can setup different crypto algorithms, which will be autoconfigured at mount time (depending on options it will or will not fail, if server does not support requested algorithms, if administrator requested not to fail, system will disable appropriate algorithm usage).

IOzone performance testing showed performance drop in case of cbc(aes)+sha1 crypto operations, but system still behaves faster than plain in-kernel async NFS. Nice picture in attach (or via link at:
http://tservice.net.ru/~s0mbre/blog/devel/fs/2008_07_07.html)

Plain read/write performance link:
http://tservice.net.ru/~s0mbre/blog/devel/fs/2008_06_25.html

Signature · 1 line
	Evgeniy Polyakov