AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
#Power
 View Only
  • 1.  cp files - slow

    Posted Thu July 30, 2009 05:07 AM

    Originally posted by: zhuli_pl


    I run the cp command on AIX 5.3. For a large file, it is quick.
    For many small files, it is slow.

    1. ls -l
    total 65408
    drwxr-xr-x 11 500 usr 4096 Jul 30 14:46 httpd-2.2.11
    -rw-r----- 1 root system 33484800 Jul 30 11:30 httpd-2.2.11.tar

    For one big file httpd-2.2.11.tar:
    #time cp httpd-2.2.11.tar /home/temp
    real 0m0.90s
    user 0m0.00s
    sys 0m0.14s

    I extracted httpd-2.2.11.tar and did the "cp" against the many small extracted files:
    1. cd httpd-2.2.11
    2. time cp -R * /home/temp
    real 0m17.61s
    user 0m0.03s
    sys 0m0.29s

    Our customer's system has many small files and the cp commands running faster on HPUX and Linux than on AIX.
    Any suggestions?
    #AIX-Forum


  • 2.  Re: cp files - slow

    Posted Thu July 30, 2009 08:55 AM

    Originally posted by: Sam_k


    Use rsync if possible... Also I don't think its OS, it should be processing power of machine or SCSI / fiber channel SAN HBA connectivity between source and destination.
    #AIX-Forum


  • 3.  Re: cp files - slow

    Posted Fri July 31, 2009 08:54 AM

    Originally posted by: zhuli_pl


    we think this is OS related. The directory has about 3500 file. When copying, AIX writes the JFS2 log heavily and caused the disk that holds the JFS2 log 100% busy.
    The log is in a separate disk.
    I tested the same thing on a PC with Linux(or even my notebook). It is fast, less than 1s. Then we change the JFS2 to JFS and mount the file system with JFS log disabled(nointegrity option). The copy time decreased from 18s to 3s, still slow than Linux. I think Linux has FS inode or similar info. in memory for all the filesystems after start. AIX doesn't have. The first time when you do copy is slow. If you do the same copy rapidly in very short time. The speed is less than 1s. But if you wait for about 6-7s and do the same copy., it became slow again. It seems the data in memory got flushed. For Linux, I waited for 10 minutes, the copy is still quick. Seems the Linux keeps the data in memory for longer time.

    AIX and Linux servers have same CPU and memory. Only one user.
    We also tuned vmo and ioo. no improvement.
    Any idea? The user has many small files to deal with. They think their application slowness is because of our AIX FS. We compete with the Linux on HP PC.
    I also got the following from a redbook:

    The use of a JFS log allows for rapid and clean recovery of file systems if a
    system goes down. However, there may be a performance trade-off here. If
    an application is doing synchronous I/O or is creating and/or removing many
    files in a short amount of time, then there may be a lot of I/O going to the JFS
    log logical volume. If both the JFS log logical volume and the file system
    logical volume are on the same physical disk, then this could cause an I/O
    bottleneck. The recommendation would be to migrate the JFS log device to
    another physical disk.
    #AIX-Forum


  • 4.  Re: cp files - slow

    Posted Fri July 31, 2009 11:17 AM

    Originally posted by: SystemAdmin


    interesting. do you use special mount options (cio,dio) on the target filesystem`? from your first post, user and system time do not differ a lot, so the waiting-for-io-completion part should make the big difference.
    #AIX-Forum