Hello, Im testing performance on a small basic repplicated cluster 2 servers 8 clients. The clients have an old solution with a regular NFS mount and the data from it has been copied to the Gfs mount. Doing simple comparison with a "time find /mnt/gfs/<datadir> -type f -mtime -2" command There are about 4000 files in the dir The gluster mount: time find /mnt/nfs/<datadir> -type f -mtime -2 real 2m0.067s <-- user 0m0.030s sys 0m0.252s The old nfs mount: time find /mnt/gfs/<datadir> -type f -mtime -2 real 0m3.009s <-- user 0m0.037s sys 0m0.368s Both find 280 files which is correct GFS mounted find take about 2 minutes and is waaay slower than the nfs mount. My question is if there are any modifications to the basic config that I can do to speed up operations like find? Best regards --- Carl Boberg Operations Memnon Networks AB Tegn?rgatan 34, SE-113 59 Stockholm Mobile: +46(0)70 467 27 12 www.memnonnetworks.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://supercolony.gluster.org/pipermail/gluster-users/attachments/20120302/6224184b/attachment.html>
On Fri, Mar 02, 2012 at 11:43:27AM +0100, Carl Boberg wrote:> time find /mnt/nfs/<datadir> -type f -mtime -2 > > real 2m0.067s <-- > user 0m0.030s > sys 0m0.252sThe -mtime -2 is forcing gluster to do a stat() on every file, and this makes gluster do a self-heal operation where it needs to access the file on both volumes: http://www.gluster.org/community/documentation/index.php/Gluster_3.1:_Triggering_Self-Heal_on_Replicate http://www.youtube.com/watch?v=AsgtE7Ph2_k Having said that, 2 minutes seems pretty slow. How many files are there in total, i.e. without the -mtime filter? Is it possible the NFS test had the inode data in cache, so was an unfair comparison? I suggest you do echo 3 >/proc/sys/vm/drop_caches (as root) on both client and server before each test. Regards, Brian.