|
Some times if you have journals on the IFS we also experience bad
performance. However if you keep directories smal it is not a problem.
On Mon, Jun 19, 2017 at 7:37 AM Scott Klement <midrange-l@xxxxxxxxxxxxxxxx>
wrote:
Mark,
Something isn't right here -- 25 seconds to run a "mv" command? It
should be sub-second. Is your subsystem low on resources?
Your second example, with the "ls" might be slow if it's a very big
directory. That one is not a good way to do things... but. the first
one shouldn't be too bad. The biggest performance issue, as I see it,
is calling "basename" since that will launch a whole new job each time
you run it.
But, even with that, I don't get why it'd take 25 seconds.
--
Scott Klement
http://www.scottklement.com
On 6/18/17 4:07 PM, mlazarus wrote:
I am attempting to do renames in an IFS folder using a wildcard--
pattern. The native IFS commands to not seem to allow wildcards, so I
adapted this from a tip published by Ted Holt.
The code is:
QSH CMD('cd /usr/Mark/Downloads/;for file in *.n37;do mv "$file"
"$(basename $file n37)h37";done')
It was taking a long time, so I pared it down to this statement as a
test:
QSH CMD('cd /usr/Mark/Downloads/;for file in *.h37;do ls
"$file";done') from the command line.
There are 54 entries out of 56 (plus . and ..) that match the
pattern. It took over 1/2 minute to display the first entry. The
entire run took about 14.5 minutes. So it's averaging 25-26 seconds
per entry. This is on a lightly utilized v7r3 Power8, that is quite
fast for most other operations.
1) Can someone explain what it's doing for it to take so long?
2) I assume there's a much better alternative. I'm looking for ideas
to do this with a minimal amount of code.
TIA.
-mark
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.