[Lustre-discuss] Lustre::LFS + Lustre::Info (inc. lustre-info.pl) available on the CPAN

2010-07-28 Thread Adrian Ulrich
First: Sorry for the shameless self advertising, but...

I uploaded two lustre-related modules to the CPAN:

#1: Lustre::Info provides easy access to information located
at /proc/fs/lustre, it also comes with a 'performance monitoring'
script called 'lustre-info.pl'

#2 Lustre::LFS offers IO::Dir and IO::File-like filehandles but
   with additional lustre-specific features ($dir_fh-set_stripe...)


Examples and details:

Lustre::Info and lustre-info.pl
---

Lustre::Info provides a Perl-OO interface to lustres procfs information.

(confusing) example code to get the blockdevice of all OSTs:
 
 #
 my $l = Lustre::Info-new;
 print join(\n, map( { $l-get_ost($_)-get_name.: 
.$l-get_ost($_)-get_blockdevice } \
@{$l-get_ost_list}), '' ) if $l-is_ost;
 #

..output:
 $ perl test.pl
 lustre1-OST001e: /dev/md17
 lustre1-OST0016: /dev/md15
 lustre1-OST000e: /dev/md13
 lustre1-OST0006: /dev/md11

The module also includes a script called 'lustre-info.pl' that can
be used to gather some live performance statistics:

Use `--ost-stats' to get a quick overview on what's going on:
$ lustre-info.pl --ost-stats
 lustre1-OST0006 (@ /dev/md11) :  write=   5.594 MB/s, read=   0.000 MB/s, 
create=  0.0 R/s, destroy=  0.0 R/s, setattr=  0.0 R/s, preprw=  6.0 R/s
 lustre1-OST000e (@ /dev/md13) :  write=   3.997 MB/s, read=   0.000 MB/s, 
create=  0.0 R/s, destroy=  0.0 R/s, setattr=  0.0 R/s, preprw=  4.0 R/s
 lustre1-OST0016 (@ /dev/md15) :  write=   5.502 MB/s, read=   0.000 MB/s, 
create=  0.0 R/s, destroy=  0.0 R/s, setattr=  0.0 R/s, preprw=  6.0 R/s
 lustre1-OST001e (@ /dev/md17) :  write=   5.905 MB/s, read=   0.000 MB/s, 
create=  0.0 R/s, destroy=  0.0 R/s, setattr=  0.0 R/s, preprw=  6.7 R/s


You can also get client-ost details via `--monitor=MODE'

$ lustre-info.pl --monitor=ost --as-list  # this will only show clients where 
read+write = 1MB/s
 client nid   | lustre1-OST0006| lustre1-OST000e| lustre1-OST0016  
   | lustre1-OST001e| +++ TOTALS +++ (MB/s)
10.201.46...@o2ib  | r=   0.0, w=   0.0 | r=   0.0, w=   0.0 | r=   0.0, w=   
0.0 | r=   0.0, w=   1.1 | read=   0.0, write=   1.1
10.201.47...@o2ib  | r=   0.0, w=   0.0 | r=   0.0, w=   1.2 | r=   0.0, w=   
2.0 | r=   0.0, w=   0.0 | read=   0.0, write=   3.2


There are many more options, checkout `lustre-info.pl --help' for details!


Lustre::LFS::Dir and Lustre::LFS::File
---

This two packages behave like IO::File and IO::Dir but both of
them add some lustre-only features to the returned filehandle.

Quick example:
 my $fh = Lustre::LFS::File; # $fh is a normal IO::File-like FH
 $fh-open( test) or die;
 print $fh Foo Bar!\n;
 my $stripe_info = $fh-get_stripe or die Not on a lustre filesystem?!\n;



Keep in mind that both Lustre modules are far from being complete:
Lustre::Info really needs some MDT support and Lustre::LFS is just a
wrapper for /usr/bin/lfs: An XS-Version would be much better.

But i'd love to hear some feedback if someone decides to play around
with this modules + lustre-info.pl :-)


Cheers,
 Adrian


___
Lustre-discuss mailing list
Lustre-discuss@lists.lustre.org
http://lists.lustre.org/mailman/listinfo/lustre-discuss


[Lustre-discuss] Read ahead / prefetching

2010-07-28 Thread Arifa Nisar
Hi,

I am trying to educate myself on prefetching/readahead algorithm for
Lustre's read. For a starter I only have two simple questions.

1 - Does Lustre detect linear or random I/O pattern or it always triggers
readahead?
2 - If readahead is triggered, how many pages are read in addition to what
is necessary? 

Thanks,
Arifa.

___
Lustre-discuss mailing list
Lustre-discuss@lists.lustre.org
http://lists.lustre.org/mailman/listinfo/lustre-discuss


Re: [Lustre-discuss] Read ahead / prefetching

2010-07-28 Thread Andreas Dilger
On 2010-07-28, at 10:43, Arifa Nisar wrote:
 I am trying to educate myself on prefetching/readahead algorithm for
 Lustre's read. For a starter I only have two simple questions.
 
 1 - Does Lustre detect linear or random I/O pattern or it always triggers
 readahead?

The current algorithm detects sequential and strided read patterns.

 2 - If readahead is triggered, how many pages are read in addition to what
 is necessary? 

It is variable based on how long the same pattern was repeating and the number 
of pages per request.

I would be happy to have you look at the strided readahead detection code more 
closely, since I suspect it would not correctly detect stride patterns with odd 
byte size and offset vs. stride patterns with full-page size and offset.

We disussed a while ago to rewrite the readahead code to be layered better on 
the client, but haven't had time to work on it yet.


Cheers, Andreas
--
Andreas Dilger
Lustre Technical Lead
Oracle Corporation Canada Inc.

___
Lustre-discuss mailing list
Lustre-discuss@lists.lustre.org
http://lists.lustre.org/mailman/listinfo/lustre-discuss