User: Password:
Subscribe / Log in / New account

Network block devices and OOM safety

Network block devices and OOM safety

Posted Mar 31, 2005 5:25 UTC (Thu) by jwb (guest, #15467)
Parent article: Network block devices and OOM safety

Is this only a problem for network block devices? Why don't network file systems like NFS,
Lustre, StorNext, etc have this problem? Are file systems not capable of spooling up backlogs of
dirty pages the way block devices can?

(Log in to post comments)

Network block devices and OOM safety

Posted Mar 31, 2005 9:47 UTC (Thu) by nix (subscriber, #2304) [Link]

They do have this problem, I think: this was also the reason why shared writable mmap support was removed from FUSE. (One nice thing about this iSCSI-inspired work is that it might lead to FUSE regaining that capability again. I hope so.)

Network block devices and OOM safety

Posted Apr 1, 2005 1:47 UTC (Fri) by giraffedata (subscriber, #1954) [Link]

I can confirm that filesystem drivers have this problem. I work on network filesystems, some of them based on ISCSI devices, and memory deadlocks and I have become good friends.

But they're a lot less common in filesystems, which is why people didn't demand a fix to the fundamental problem (network layer being simultaneously above and below the main memory pool) years ago.

Most network filesystem access is with NFS. NFS in its normal configuration always writes synchronously, so the amount of dirty pages is very small.

StorNext does relatively little direct network I/O; the majority of its I/O is through block devices. (And since they aren't usually TCP/IP-based devices, the current problem is inapplicable).

Lustre hasn't seen a large variety of applications; it probably gets lucky.

Most filesystem drivers naturally meter their activity by using the buffer cache, with its somewhat ham-handed limitation on the total amount of memory it's willing to occupy. So long before memory usage gets critical, file-using processes slow down, waiting for new buffers, thereby giving the system a chance to clean out the old ones.

I work on a filesystem driver that uses its own cache manager instead of the buffer cache -- a cache manager that isn't afraid to use every byte of memory for file cache if that's the optimum use for it. Hence my deep experience with these deadlocks.

Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds