[Gluster-users] ls performance on directories with small number of items
aroberts at domicilium.com
Mon Nov 27 13:18:56 UTC 2017
I have a situation where an apache web server is trying to locate the IndexDocument for a directory on a gluster volume. This URL is being hit roughly 20 times per second. There is only 1 file in this directory. However, the parent directory does have a large number of items (+123,000 files and dirs) and we are performing operations to move these files into 2 levels of subdirs.
We are seeing very slow response times (around 8 seconds) in apache and also when trying to ls on this dir. Before we started the migrations to move files on the large parent dir into 2 sub levels, we weren't aware of a problem.
[root at web-02 images]# time ls -l dir1/get/ | wc -l
Other directories with only 1 item return very quickly (<1 sec).
[root at Web-01 images]# time ls -l dir1/tmp1/ | wc -l
I'm just trying to understand what would slow down this operation so much. Is it the high frequency of attempts to read the directory (apache hits to dir1/get/) ? Do the move operations on items in the parent directory have any impact?
Some background info:
[root at web-02 images]# gluster --version
glusterfs 3.7.20 built on Jan 30 2017 15:39:29
Repository revision: git://git.gluster.com/glusterfs.git
Copyright (c) 2006-2011 Gluster Inc. <http://www.gluster.com>
GlusterFS comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GlusterFS under the terms of the GNU General Public License.
[root at web-02 images]# gluster vol info
Volume Name: web_vol1
Volume ID: 0d63de20-c9c2-4931-b4a3-6aed5ae28057
Number of Bricks: 1 x 2 = 2
Any insight would be gratefully received.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gluster-users