3 Replies Latest reply on Mar 27, 2014 4:55 PM by Henk Vandenbergh-Oracle

    How to use forfiles= without recreating over and over?


      I’m struggling trying to get some file testing done and can’t figure what the right combination of commands should be. The goal is to have a number of files created (64, for example), then run different tests on those files, varying the number of files tested (from 4 doubled to 64, for example).  Things work fine if I have the rd section of the script set as:








      The problem with this is that if I want to repeat the test or run a different test, the files will be recreated, taking much longer than necessary, as well as possibly causing storage specific issues. If I use “format=restart” or “format=no”, I end up with an error message such as:


      old depth=1; new depth=1

      old width=1; new width=1

      old files=64; new files=4


      I’ve tried using”forfiles=(4-64,d)”, but that also gives me errors similar to the above. The overall goal is to have a directory with a specific number of files of the specified length (files=64,format=only on a special rd line?), then run multiple tests, varying the number of files to be tested without having to recreate them every time. I’ve tried all combinations of forfiles, format=, and most other keywords I can think of, but just can’t seem to be able to get things to work without vdbench telling me that I can’t test ’n’ files if the directory contains a number of files other than ’n’. Same file sizes in all cases; just want to test a different number of them.


      The real question is how I can use the forfiles= command in a script that will be run many times without having to create the files each and every time. I’m clearly missing an important concept, but after a week of trying, I can’t figure out what it is.


      Any ideas?

        • 1. Re: How to use forfiles= without recreating over and over?
          Henk Vandenbergh-Oracle

          Correct me if I am wrong: You want to have 64 files created, and then test using, then 8, then 16, etc.


          'forfiles' won't do this; the file count is an integral part of of a file system structure and can not be changed without starting all over with a complete format.


          How about using for 'workingsetsize' parameter? This won't allow you to directly specify the amount of files, but if your file sizes are all the same then you'll just have do do a little math.

          I just ran this:









          Note the use of 'format=once'.


          This is the result:

          C:\vdbench504\output>grep -i created logfile.html

          10:31:59.151 FILE_CREATES        Files created:                               100     100/sec

          10:31:59.152 DIRECTORY_CREATES   Directories created:                           1       1/sec

          10:31:59.235 localhost-0: Created workingset=20k subset for anchor=r:\junk\fsd1 using 2 of 100 files.

          10:32:03.405 localhost-0: Created workingset=40k subset for anchor=r:\junk\fsd1 using 4 of 100 files.

          10:32:07.297 localhost-0: Created workingset=60k subset for anchor=r:\junk\fsd1 using 6 of 100 files.



          Hope this helps,



          • 2. Re: How to use forfiles= without recreating over and over?

            That should take care of in Henk, thanks a bunch. I tried the forwss= earlier, but didn't have the right format= choice at the time (too many combinations!). All the files are the same size, so your solution should work nicely.


            - Ken

            • 3. Re: How to use forfiles= without recreating over and over?
              Henk Vandenbergh-Oracle

              Too many combinations. Agreed. Even I don't always remember all of them.


              Glad to be of help.