3 Replies Latest reply: Mar 27, 2014 11:55 AM by Henk Vandenbergh-Oracle RSS

    How to use forfiles= without recreating over and over?

    8b1c1bb0-108c-4b84-b8d4-d6b73ada398e

      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:

       

      rd=f4,fwd=fwd4,files=4,format=yes

      rd=f8,fwd=fwd8,files=8,format=yes

      rd=f16,fwd=fwd16,files=16,format=yes

      rd=f32,fwd=fwd32,files=32,format=yes

      rd=f64,fwd=fwd64,files=64,format=yes

       

      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:

           

          fsd=default,depth=1,width=1,files=100,size=10k

          fsd=fsd1,anchor=r:\junk\fsd1

          fwd=fwd1,fsd=fsd1,xfersize=4k,fileio=random,fileselect=random,threads=1

          rd=default,elapsed=3,interval=1

          rd=rd1,fwd=*,operations=(read),fwdrate=100,format=once,forwss=(20k,40k,60k)

           

           

          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,

           

          Henk.

          • 2. Re: How to use forfiles= without recreating over and over?
            8b1c1bb0-108c-4b84-b8d4-d6b73ada398e

            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.

               

               

              Henk.