AIX

AIX

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


#Power
#Power
 View Only
  • 1.  Commands taking time to execute in deep directory

    Posted Tue June 28, 2016 03:26 AM

    Originally posted by: chindi


    We have AIX 6.1 TL4 , where in we have deep directory structure ( say 100 folders with 3 milliion files )  where all commands like which ll , which sqlplus taking almost 15sec to get executed.

    Whereas the same when ran with less directories is lightning fast.

    Let me know if any OS parameter can change this behavior.  

    Note : there is no cpu , memory  , disk io spike when this is being tested.


    #AIX-Forum


  • 2.  Re: Commands taking time to execute in deep directory

    Posted Tue June 28, 2016 06:05 AM

    Originally posted by: Wouter Liefting


    Could you let us know how much memory you've got free for caching?

    In topas, this is %Noncomp vs. total, in nmon, it's called FlyeSystemCache (numperm).

    This won't help the first time you perform a which command, but it will help on subsequent lookups.

     

    Specifically for the "which" command: This looks at all directories in your $PATH variable. Pruning that variable to only include the proper directories (and not including the "." directory) may help as well.

     

    And you're not doing this over NFS, are you?


    #AIX-Forum


  • 3.  Re: Commands taking time to execute in deep directory

    Posted Wed June 29, 2016 01:49 AM

    Originally posted by: chindi


    Hi,

    No its not NFS .

    Its a SAN file-system.

    Its not only for which command , we are trying to connect to DB server through "sqlplus /"  when we run it from home directory of user it runs fine.

    but when we run it from deep directory path which has 100 folders ( 1 million files )  it takes minimum 20sec .

     

    % Non-comp is 25%


    #AIX-Forum


  • 4.  Re: Commands taking time to execute in deep directory

    Posted Thu June 30, 2016 03:02 AM

    Originally posted by: Wouter Liefting


    Well, there are standard tuning things that you can do to increase filesystem/SAN performance. See the Performance & Tuning redbook for that. Think of things like increasing memory (which increases cache/buffer sizes), playing with queue_depth and such.

     

    But my main question would be why an sqlplus command would need to traverse through all these subdirectories before it starts. And if there's a way to prevent that. Have you tried an ltrace/strace on sqlplus? Is there anything weird in your environment ("set" or "env" command) that would cause this?


    #AIX-Forum


  • 5.  Re: Commands taking time to execute in deep directory

    Posted Thu June 30, 2016 03:06 AM

    Originally posted by: chindi


    Hi ,

     

    Exactly we too have the same question.

    Can we check the PATH variable which is defined ? if we can move it with ORACLE_HOME first ? So that it doesn't have to traverse deep path ?


    #AIX-Forum


  • 6.  Re: Commands taking time to execute in deep directory

    Posted Thu June 30, 2016 04:23 AM

    Originally posted by: Wouter Liefting


    When you run a command, your $PATH variable is evaluated left-to-right. So it definitely makes sense to ensure that your $PATH variable contains the most likely directory where the executable is located first. Also, if you have 1000's or more files in your directory, make sure your $PATH variable does not contain the current directory "." (dot).

    To check that this is indeed the problem, you can also circumvent the whole usage of $PATH, by supplying the absolute path of your command. So you would run "/usr/sbin/sqlplus" instead of "sqlplus".


    #AIX-Forum


  • 7.  Re: Commands taking time to execute in deep directory

    Posted Thu June 30, 2016 04:42 AM

    Originally posted by: chindi


    Hi Wouter,

     

    Will check and let you know the same.


    #AIX-Forum


  • 8.  Re: Commands taking time to execute in deep directory

    Posted Thu June 30, 2016 05:02 AM

    Originally posted by: chindi


    Hi Wouter,

    We tried to check the same. 

    But No luck , even after giving absolute path from deep directory structure , it does take time for "sqlplus /" to get connected  to DB server.

    Whereas if we try the same from less number of directories , its lightning fast.


    #AIX-Forum