Peter Braam
2008-May-09 04:55 UTC
[Lustre-discuss] Wide area use of Lustre and client caches
During the LUG I was approached by a customer who wants to use a Lustre file system at the far end of a WAN link. Since the situation may be of general interest, I thought I would post a short report of the discussion here. His use pattern was interesting ? a number of Windows clients must be browsing files stored in Lustre in this remote location. It was expected that the files would be fairly large, would be viewed by multiple clients, and that few or no modifications would be made. After some discussion we proposed a solution that involved a deployment as follows: 1. A single Lustre client with lots of RAM. The settings on the client would be (1) that the memory available for caching by lustre is large (2) that the number of locks that can be held by this client is fairly large (3) that this client uses the ?open cache?. 2. A samba server on this Lustre client. With the settings above, we can expect that many of the files can be cached in the Lustre client, hence after the initial read, I/O would be local in the remote site. With the open file cache enabled, even the open and close traffic will not go to the servers, but can be handled by the client. We think that this will lead to a very good solution, that can work today. A refinement is possible, that requires some development. There is a feature in the Linux kernel to use a disk partition as a cache for a file system ? it is called cachefs. This requires a few hooks in Lustre to store chunks of files that are transferred to the client into this cache, and cache invalidation calls to remove them. It allows us to achieve the same performance as with the solution above, except that the disk will be a bit slower than memory, but it can also be much larger. We are eagerly awaiting the results of testing this configuration! - peter - -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lustre.org/pipermail/lustre-discuss/attachments/20080508/480a7bd2/attachment.html
Brian J. Murrell
2008-May-09 14:25 UTC
[Lustre-discuss] [Lustre-devel] Wide area use of Lustre and client caches
On Thu, 2008-05-08 at 22:55 -0600, Peter Braam wrote:> > His use pattern was interesting ? a number of Windows clients must be > browsing files stored in Lustre in this remote location. It was > expected that the files would be fairly large, would be viewed by > multiple clients, and that few or no modifications would be made.Even still it''s useful during implementation to think of the use case of that remote client having read a file and caching and holding a read lock on that file, say 1GB in size, and then another client wanting to update say, 1KB in the middle of the file. It would be beneficial for that 1GB file to have a small (but still practical) stripe size so that the amount of cache that needs to be thrown away to accommodate the write is relatively small. b. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://lists.lustre.org/pipermail/lustre-discuss/attachments/20080509/554406bd/attachment.bin
Peter Braam
2008-May-09 15:08 UTC
[Lustre-discuss] [Lustre-devel] Wide area use of Lustre and client caches
Nono - striping should only be used to get more bandwidth from servers. The correct solution to the problem you point out is a lock conversion, planned long ago, still far away maybe (Nikita?). Peter On 5/9/08 8:25 AM, "Brian J. Murrell" <Brian.Murrell at Sun.COM> wrote:> On Thu, 2008-05-08 at 22:55 -0600, Peter Braam wrote: >> >> His use pattern was interesting ? a number of Windows clients must be >> browsing files stored in Lustre in this remote location. It was >> expected that the files would be fairly large, would be viewed by >> multiple clients, and that few or no modifications would be made. > > Even still it''s useful during implementation to think of the use case of > that remote client having read a file and caching and holding a read > lock on that file, say 1GB in size, and then another client wanting to > update say, 1KB in the middle of the file. It would be beneficial for > that 1GB file to have a small (but still practical) stripe size so that > the amount of cache that needs to be thrown away to accommodate the > write is relatively small. > > b. > > _______________________________________________ > Lustre-devel mailing list > Lustre-devel at lists.lustre.org > http://lists.lustre.org/mailman/listinfo/lustre-devel
Brian J. Murrell
2008-May-09 17:08 UTC
[Lustre-discuss] [Lustre-devel] Wide area use of Lustre and client caches
On Fri, 2008-05-09 at 09:08 -0600, Peter Braam wrote:> Nono - striping should only be used to get more bandwidth from servers. The > correct solution to the problem you point out is a lock conversion,Indeed, I have heard that term being used and figured that that is what it was all about, however...> planned > long ago, still far away maybe (Nikita?).Given that it''s not yet available and won''t be for some time, isn''t breaking a file up into many objects via striping a sufficient alternative to the problem? Are there other problems caused by striping a file (that technically doesn''t need more bandwidth) that outweigh the benefits of not having to toss so much cache away when a file is written to (i.e. assuming the cost of reading the file is high such as it would be on a WAN link)? b. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://lists.lustre.org/pipermail/lustre-discuss/attachments/20080509/2051fccf/attachment.bin
Nikita Danilov
2008-May-09 18:17 UTC
[Lustre-discuss] [Lustre-devel] Wide area use of Lustre and client caches
Peter Braam writes: > Nono - striping should only be used to get more bandwidth from servers. The > correct solution to the problem you point out is a lock conversion, planned > long ago, still far away maybe (Nikita?). Yes, it''s far away. Interestingly, similar lock "conversion" for meta-data locks is required for write-back cache, when a sub-tree lock is split into a set of sub-sub-tree sub-locks. > > Peter Nikita.
Andreas Dilger
2008-May-09 23:01 UTC
[Lustre-discuss] [Lustre-devel] Wide area use of Lustre and client caches
On May 09, 2008 09:08 -0600, Peter J. Braam wrote:> Nono - striping should only be used to get more bandwidth from servers. The > correct solution to the problem you point out is a lock conversion, planned > long ago, still far away maybe (Nikita?).This task is something that Oleg has been working on occasionally, I think there are patches around but fairly old (though not as bad as might be expected, because LDLM code changes relatively slowly).> On 5/9/08 8:25 AM, "Brian J. Murrell" <Brian.Murrell at Sun.COM> wrote: > > Even still it''s useful during implementation to think of the use case of > > that remote client having read a file and caching and holding a read > > lock on that file, say 1GB in size, and then another client wanting to > > update say, 1KB in the middle of the file. It would be beneficial for > > that 1GB file to have a small (but still practical) stripe size so that > > the amount of cache that needs to be thrown away to accommodate the > > write is relatively small.Having multiple stripes would save invalidation of (nstripes - 1) / nstripes of the file, but in general the "update in the middle" paradigm is very rare in real life, so in practise I don''t think this will help much. Even the "add a byte in the middle of a text file" case always causes the whole file to be rewritten because of backing up the old file. The only common applications I''m aware of that do partial-file read/write operations are databases and peer-to-peer file sharing. Cheers, Andreas -- Andreas Dilger Sr. Staff Engineer, Lustre Group Sun Microsystems of Canada, Inc.