HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

rm command take too long to complete

 
vpar
Advisor

rm command take too long to complete

Hi

rx7640.
11.31 with lvm environment.

It takes too long to delete a file 1G in size.
It took 10-20seconds but creating a file time is acceptable.

#time dd if=/dev/zero of=/dd.img bs=1024k count=1024

real 1.0

#time rm /dd.img
real 10.0

but the deleting for 100MB is acceptable( <1seconds).

I tested another way using prealloc and no symptoms like that.
#time prealloc /dd.img 1G
real 5.0
#time rm /dd.img
real 0.2 <=accepted

This symptom happened both internal disks(local disks) and shared disks.

I tested it in our lab but no encountered that problem.


#fstyp -v /dev/vg00/lvol3
vxfs
version: 6
f_bsize: 8192
f_frsize: 8192

regards


5 REPLIES
vpar
Advisor

Re: rm command take too long to complete

I forgot to post tusc ouput.

Most time comsumed in unlink.

18:57:37 [21545] access(0x2000000040011240, W_OK) ............. [entry]
18:57:37 [21545] access("dd.img", W_OK) ....................... = 0
18:57:47 [21545] unlink(0x2000000040011240) ................... [running]
18:57:47 [21545] unlink("dd.img") ............................. = 0
18:57:47 [21545] exit(0) ...................................... [entry]
18:57:47 [21545] exit(0) ...................................... WIFEXITED(0)

Re: rm command take too long to complete

I wonder if the problem here is something to do with buffer cache... although your block size used would suggest not... (something of that size should bypass the buffer cache anyway unless you've been fiddling with vxtunefs)

Out of interest, if you force a sync after the dd, does the rm still take a long time? i.e.

# time dd if=/dev/zero of=/dd.img bs=1024k count=1024

# sync

# time rm /dd.img

HTH

Duncan

HTH

Duncan

Re: rm command take too long to complete

oh, and what mount options are you using on this filesystem?

Duncan

HTH

Duncan
vpar
Advisor

Re: rm command take too long to complete

Hi

mount option:

# mount -l
/ on /dev/vg00/lvol3 ioerror=nodisable,log,dev=40000003 on Thu Jul 29 15:52:21 2010
/stand on /dev/vg00/lvol1 ioerror=mwdisable,log,nodatainlog,tranflush,dev=40000001 on Thu Jul 29 15:52:26 2010
/var on /dev/vg00/lvol8 ioerror=mwdisable,delaylog,nodatainlog,dev=40000008 on Thu Jul 29 15:52:50 2010
/var/adm/crash on /dev/vg00/lvol5 ioerror=mwdisable,delaylog,nodatainlog,dev=40000005 on Thu Jul 29 15:52:50 2010
/usr on /dev/vg00/lvol7 ioerror=mwdisable,delaylog,nodatainlog,dev=40000007 on Thu Jul 29 15:52:50 2010
/tmp on /dev/vg00/lvol4 ioerror=mwdisable,delaylog,nodatainlog,dev=40000004 on Thu Jul 29 15:52:50 2010
/oracle on /dev/vg00/lvol9 ioerror=mwdisable,delaylog,nodatainlog,dev=40000009 on Thu Jul 29 15:52:50 2010
/opt on /dev/vg00/lvol6 ioerror=mwdisable,delaylog,nodatainlog,dev=40000006 on Thu Jul 29 15:52:50 2010

Re: rm command take too long to complete

>Duncan: I wonder if the problem here is something to do with buffer cache.

That might be it. To remove a file you have to invalidate the filecache, fiddle with the directory entry and then clean up all of the extents.

prealloc wouldn't have the filecache. Or waiting until the next day to do the rm.

When I have long times with rm, it's because I have lots of small files.