Hi All, In the README for the mmfind command it says: mmfind A highly efficient file system traversal tool, designed to serve as a drop-in replacement for the 'find' command as used against GPFS FSes. And: mmfind is expected to be slower than find on file systems with relatively few inodes. This is due to the overhead of using mmapplypolicy. However, if you make use of the -exec flag to carry out a relatively expensive operation on each file (e.g. compute a checksum), using mmfind should yield a significant performance improvement, even on a file system with relatively few inodes. I have a list of just shy of 50 inode numbers that I need to figure out what file they correspond to, so I decided to give mmfind a try: + cd /usr/lpp/mmfs/samples/ilm + ./mmfind /gpfs23 -inum 113769917 -o -inum 132539418 -o -inum 135584191 -o -inum 136471839 -o -inum 137009371 -o -inum 137314798 -o -inum 137939675 -o -inum 137997971 -o -inum 138013736 -o -inum 138029061 -o -inum 138029065 -o -inum 138029076 -o -inum 138029086 -o -inum 138029093 -o -inum 138029099 -o -inum 138029101 -o -inum 138029102 -o -inum 138029106 -o -inum 138029112 -o -inum 138029113 -o -inum 138029114 -o -inum 138029119 -o -inum 138029120 -o -inum 138029121 -o -inum 138029130 -o -inum 138029131 -o -inum 138029132 -o -inum 138029141 -o -inum 138029146 -o -inum 138029147 -o -inum 138029152 -o -inum 138029153 -o -inum 138029154 -o -inum 138029163 -o -inum 138029164 -o -inum 138029165 -o -inum 138029174 -o -inum 138029175 -o -inum 138029176 -o -inum 138083075 -o -inum 138083148 -o -inum 138083149 -o -inum 138083155 -o -inum 138216465 -o -inum 138216483 -o -inum 138216507 -o -inum 138216535 -o -inum 138235320 -ls I kicked that off last Friday and it is _still_ running. By comparison, I have a Perl script that I have run in the past that simple traverses the entire filesystem tree and stat’s each file and outputs that to a log file. That script would “only” run ~24 hours. Clearly mmfind as I invoked it is much slower than the corresponding Perl script, so what am I doing wrong? Thanks… Kevin — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu<mailto:Kevin.Buterbaugh@vanderbilt.edu> - (615)875-9633
Please try: mmfind --polFlags '-N a_node_list -g /gpfs23/tmp' directory find-flags ... Where a_node_list is a node list of your choice and /gpfs23/tmp is a temp directory of your choice... And let us know how that goes. Also, you have chosen a special case, just looking for some inode numbers -- so find can skip stating the other inodes... whereas mmfind is not smart enough to do that -- but still with parallelism, I'd guess mmapplypolicy might still beat find in elapsed time to complete, even for this special case. -- Marc K of GPFS From: "Buterbaugh, Kevin L" <Kevin.Buterbaugh@Vanderbilt.Edu> To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Date: 03/06/2018 01:52 PM Subject: [gpfsug-discuss] mmfind performance Sent by: gpfsug-discuss-bounces@spectrumscale.org Hi All, In the README for the mmfind command it says: mmfind A highly efficient file system traversal tool, designed to serve as a drop-in replacement for the 'find' command as used against GPFS FSes. And: mmfind is expected to be slower than find on file systems with relatively few inodes. This is due to the overhead of using mmapplypolicy. However, if you make use of the -exec flag to carry out a relatively expensive operation on each file (e.g. compute a checksum), using mmfind should yield a significant performance improvement, even on a file system with relatively few inodes. I have a list of just shy of 50 inode numbers that I need to figure out what file they correspond to, so I decided to give mmfind a try: + cd /usr/lpp/mmfs/samples/ilm + ./mmfind /gpfs23 -inum 113769917 -o -inum 132539418 -o -inum 135584191 -o -inum 136471839 -o -inum 137009371 -o -inum 137314798 -o -inum 137939675 -o -inum 137997971 -o -inum 138013736 -o -inum 138029061 -o -inum 138029065 -o -inum 138029076 -o -inum 138029086 -o -inum 138029093 -o -inum 138029099 -o -inum 138029101 -o -inum 138029102 -o -inum 138029106 -o -inum 138029112 -o -inum 138029113 -o -inum 138029114 -o -inum 138029119 -o -inum 138029120 -o -inum 138029121 -o -inum 138029130 -o -inum 138029131 -o -inum 138029132 -o -inum 138029141 -o -inum 138029146 -o -inum 138029147 -o -inum 138029152 -o -inum 138029153 -o -inum 138029154 -o -inum 138029163 -o -inum 138029164 -o -inum 138029165 -o -inum 138029174 -o -inum 138029175 -o -inum 138029176 -o -inum 138083075 -o -inum 138083148 -o -inum 138083149 -o -inum 138083155 -o -inum 138216465 -o -inum 138216483 -o -inum 138216507 -o -inum 138216535 -o -inum 138235320 -ls I kicked that off last Friday and it is _still_ running. By comparison, I have a Perl script that I have run in the past that simple traverses the entire filesystem tree and stat’s each file and outputs that to a log file. That script would “only” run ~24 hours. Clearly mmfind as I invoked it is much slower than the corresponding Perl script, so what am I doing wrong? Thanks… Kevin — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu - (615)875-9633 _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listi...
Hi Marc, Thanks, I’m going to give this a try as the first mmfind finally finished overnight, but produced no output: /root root@gpfsmgrb# bash -x ~/bin/klb.sh + cd /usr/lpp/mmfs/samples/ilm + ./mmfind /gpfs23 -inum 113769917 -o -inum 132539418 -o -inum 135584191 -o -inum 136471839 -o -inum 137009371 -o -inum 137314798 -o -inum 137939675 -o -inum 137997971 -o -inum 138013736 -o -inum 138029061 -o -inum 138029065 -o -inum 138029076 -o -inum 138029086 -o -inum 138029093 -o -inum 138029099 -o -inum 138029101 -o -inum 138029102 -o -inum 138029106 -o -inum 138029112 -o -inum 138029113 -o -inum 138029114 -o -inum 138029119 -o -inum 138029120 -o -inum 138029121 -o -inum 138029130 -o -inum 138029131 -o -inum 138029132 -o -inum 138029141 -o -inum 138029146 -o -inum 138029147 -o -inum 138029152 -o -inum 138029153 -o -inum 138029154 -o -inum 138029163 -o -inum 138029164 -o -inum 138029165 -o -inum 138029174 -o -inum 138029175 -o -inum 138029176 -o -inum 138083075 -o -inum 138083148 -o -inum 138083149 -o -inum 138083155 -o -inum 138216465 -o -inum 138216483 -o -inum 138216507 -o -inum 138216535 -o -inum 138235320 -ls /root root@gpfsmgrb# BTW, I had put that in a simple script simply because I had a list of those inodes and it was easier for me to get that in the format I wanted via a script that I was editing than trying to do that on the command line. However, in the log file it was producing it “hit” on 48 files: [I] Inodes scan: 978275821 files, 99448202 directories, 37189547 other objects, 1967508 'skipped' files and/or errors. [I] 2018-03-06@23:43:15.988 Policy evaluation. 1114913570 files scanned. [I] 2018-03-06@23:43:16.016 Sorting 48 candidate file list records. [I] 2018-03-06@23:43:16.040 Sorting 48 candidate file list records. [I] 2018-03-06@23:43:16.065 Choosing candidate files. 0 records scanned. [I] 2018-03-06@23:43:16.066 Choosing candidate files. 48 records scanned. [I] Summary of Rule Applicability and File Choices: Rule# Hit_Cnt KB_Hit Chosen KB_Chosen KB_Ill Rule 0 48 1274453504 48 1274453504 0 RULE 'mmfind' LIST 'mmfindList' DIRECTORIES_PLUS SHOW(.) WHERE(.) [I] Filesystem objects with no applicable rules: 1112946014. [I] GPFS Policy Decisions and File Choice Totals: Chose to list 1274453504KB: 48 of 48 candidates; Predicted Data Pool Utilization in KB and %: Pool_Name KB_Occupied KB_Total Percent_Occupied gpfs23capacity 564722407424 624917749760 90.367477583% gpfs23data 304797672448 531203506176 57.378701177% system 0 0 0.000000000% (no user data) [I] 2018-03-06@23:43:16.066 Policy execution. 0 files dispatched. [I] 2018-03-06@23:43:16.102 Policy execution. 0 files dispatched. [I] A total of 0 files have been migrated, deleted or processed by an EXTERNAL EXEC/script; 0 'skipped' files and/or errors. While I’m going to follow your suggestion next, if you (or anyone else on the list) can explain why the “Hit_Cnt” is 48 but the “-ls” I passed to mmfind didn’t result in anything being listed, my curiosity is piqued. And I’ll go ahead and say it before someone else does … I haven’t just chosen a special case, I AM a special case… ;-) Kevin On Mar 6, 2018, at 4:27 PM, Marc A Kaplan <makaplan@us.ibm.com<mailto:makaplan@us.ibm.com>> wrote: Please try: mmfind --polFlags '-N a_node_list -g /gpfs23/tmp' directory find-flags ... Where a_node_list is a node list of your choice and /gpfs23/tmp is a temp directory of your choice... And let us know how that goes. Also, you have chosen a special case, just looking for some inode numbers -- so find can skip stating the other inodes... whereas mmfind is not smart enough to do that -- but still with parallelism, I'd guess mmapplypolicy might still beat find in elapsed time to complete, even for this special case. -- Marc K of GPFS From: "Buterbaugh, Kevin L" <Kevin.Buterbaugh@Vanderbilt.Edu<mailto:Kevin.Buterbaugh@Vanderbilt.Edu>> To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org<mailto:gpfsug-discuss@spectrumscale.org>> Date: 03/06/2018 01:52 PM Subject: [gpfsug-discuss] mmfind performance Sent by: gpfsug-discuss-bounces@spectrumscale.org<mailto:gpfsug-discuss-bounces@spectrumscale.org> ________________________________ Hi All, In the README for the mmfind command it says: mmfind A highly efficient file system traversal tool, designed to serve as a drop-in replacement for the 'find' command as used against GPFS FSes. And: mmfind is expected to be slower than find on file systems with relatively few inodes. This is due to the overhead of using mmapplypolicy. However, if you make use of the -exec flag to carry out a relatively expensive operation on each file (e.g. compute a checksum), using mmfind should yield a significant performance improvement, even on a file system with relatively few inodes. I have a list of just shy of 50 inode numbers that I need to figure out what file they correspond to, so I decided to give mmfind a try: + cd /usr/lpp/mmfs/samples/ilm + ./mmfind /gpfs23 -inum 113769917 -o -inum 132539418 -o -inum 135584191 -o -inum 136471839 -o -inum 137009371 -o -inum 137314798 -o -inum 137939675 -o -inum 137997971 -o -inum 138013736 -o -inum 138029061 -o -inum 138029065 -o -inum 138029076 -o -inum 138029086 -o -inum 138029093 -o -inum 138029099 -o -inum 138029101 -o -inum 138029102 -o -inum 138029106 -o -inum 138029112 -o -inum 138029113 -o -inum 138029114 -o -inum 138029119 -o -inum 138029120 -o -inum 138029121 -o -inum 138029130 -o -inum 138029131 -o -inum 138029132 -o -inum 138029141 -o -inum 138029146 -o -inum 138029147 -o -inum 138029152 -o -inum 138029153 -o -inum 138029154 -o -inum 138029163 -o -inum 138029164 -o -inum 138029165 -o -inum 138029174 -o -inum 138029175 -o -inum 138029176 -o -inum 138083075 -o -inum 138083148 -o -inum 138083149 -o -inum 138083155 -o -inum 138216465 -o -inum 138216483 -o -inum 138216507 -o -inum 138216535 -o -inum 138235320 -ls I kicked that off last Friday and it is _still_ running. By comparison, I have a Perl script that I have run in the past that simple traverses the entire filesystem tree and stat’s each file and outputs that to a log file. That script would “only” run ~24 hours. Clearly mmfind as I invoked it is much slower than the corresponding Perl script, so what am I doing wrong? Thanks… Kevin — Kevin Buterbaugh - Senior System Administrator Vanderbilt University - Advanced Computing Center for Research and Education Kevin.Buterbaugh@vanderbilt.edu<mailto:Kevin.Buterbaugh@vanderbilt.edu>- (615)875-9633 _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org<http://spectrumscale.org> https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listinfo_gpfsug-2Ddiscuss&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=cvpnBBH0j41aQy0RPiG2xRL_M8mTc1izuQD3_PmtjZ8&m=48WYhVkWI1kr_BM-Wg_VaXEOi7xfGusnZcJtkiA98zg&s=IXUhEC_thuGAVwGJ02oazCCnKEuAdGeg890fBelP4kE&e=<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefense.proofpoint.com%2Fv2%2Furl%3Fu%3Dhttp-3A__gpfsug.org_mailman_listinfo_gpfsug-2Ddiscuss%26d%3DDwICAg%26c%3Djf_iaSHvJObTbx-siA1ZOg%26r%3DcvpnBBH0j41aQy0RPiG2xRL_M8mTc1izuQD3_PmtjZ8%26m%3D48WYhVkWI1kr_BM-Wg_VaXEOi7xfGusnZcJtkiA98zg%26s%3DIXUhEC_thuGAVwGJ02oazCCnKEuAdGeg890fBelP4kE%26e%3D&data=02%7C01%7CKevin.Buterbaugh%40vanderbilt.edu%7C724521c8034241913d8508d58412dcf8%7Cba5a7f39e3be4ab3b45067fa80faecad%7C0%7C0%7C636560138922366489&sdata=qp%2FZwpYl77ThzYApt5VKMnPVfIc44BR6dOwTl62HpXM%3D&reserved=0> _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org<http://spectrumscale.org> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgpfsug.org%2...
As always when dealing with computers and potentially long running jobs, run a test on a handful of files first, so you can rapidly debug. Did you read the mmfind.README ? It mentions...that this sample utility "some user assembly required..." ... mmfindUtil_processOutputFile.c A utility to parse the "list file" produced by mmapplypolicy and to print it in a find-compatible format mmfind invokes it once mmapplypolicy begins to populate the "list file" mmfindUtil_processOutputFile.sampleMakefile copy to 'makefile', modify as needed, and run 'make' to compile mmfindUtil_processOutputFile.c This should produce a binary called mmfindUtil_processOutputFile mmfind will not be able to run until this utility has been compiled on the node from which you launch mmfind. Works for me... [root@n2 ilm]# ./mmfind /goo/zdbig -ls 2463649 256 drwxr-xr-x 2 root root 262144 Feb 9 11:41 /goo/zdbig 6804497 0 -rw-r--r-- 1 root root 0 Feb 9 11:41 /goo/zdbig/xy
On the subject of mmfind, I would like to find files which have the misc attributes relevant to AFM. For instance files which have the attribute 'v' The file is newly created, not yet copied to home I can write a policy to do this, and I have a relevant policy written. However I would like to do this using mmfind, which seems a nice general utility. This syntax does not work: mmfind /hpc -eaWithValue MISC_ATTRIBUTES===v Before anyone says it, I am mixing up MISC_ATTRIBUTES and extended attributes! My question really is - has anyone done this sort of serch using mmfind? Thankyou From: gpfsug-discuss-bounces@spectrumscale.org [mailto:gpfsug-discuss-bounces@spectrumscale.org] On Behalf Of Marc A Kaplan Sent: Wednesday, March 07, 2018 8:16 PM To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Subject: Re: [gpfsug-discuss] mmfind -ls and so forth As always when dealing with computers and potentially long running jobs, run a test on a handful of files first, so you can rapidly debug. Did you read the mmfind.README ? It mentions...that this sample utility "some user assembly required..." ... mmfindUtil_processOutputFile.c A utility to parse the "list file" produced by mmapplypolicy and to print it in a find-compatible format mmfind invokes it once mmapplypolicy begins to populate the "list file" mmfindUtil_processOutputFile.sampleMakefile copy to 'makefile', modify as needed, and run 'make' to compile mmfindUtil_processOutputFile.c This should produce a binary called mmfindUtil_processOutputFile mmfind will not be able to run until this utility has been compiled on the node from which you launch mmfind. Works for me... [root@n2 ilm]# ./mmfind /goo/zdbig -ls 2463649 256 drwxr-xr-x 2 root root 262144 Feb 9 11:41 /goo/zdbig 6804497 0 -rw-r--r-- 1 root root 0 Feb 9 11:41 /goo/zdbig/xy -- The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. Unless explicitly stated otherwise in the body of this communication or the attachment thereto (if any), the information is provided on an AS-IS basis without any express or implied warranties or liabilities. To the extent you are relying on this information, you are doing so at your own risk. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. Neither the sender nor the company/group of companies he or she represents shall be liable for the proper and complete transmission of the information contained in this communication, or for any delay in its receipt.
(John Hearns, et. al.) Some minor script hacking would be the easiest way add test(s) for other MISC_ATTRIBUTES Notice mmfind concentrates on providing the most popular classic(POSIX) and Linux predicates, BUT also adds a few gpfs specific predicates (mmfind --help show you these) -ea -eaWithValue -gpfsImmut -gpfsAppOnly Look at the implementation of -gpfsImmut in tr_findToPol.pl ... sub tr_gpfsImmut{ return "( /* -gpfsImmut */ MISC_ATTRIBUTES LIKE '%X%')"; } So easy to extend this for any or all the others.... True it's perl, but you don't have to be a perl expert to cut-paste-hack another predicate into the script. Let us know how you make out with this... Perhaps we shall add a general predicate -gpfsMiscAttrLike '...' to the next version... -- Marc K of GPFS From: John Hearns <john.hearns@asml.com> To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Date: 03/08/2018 04:59 AM Subject: Re: [gpfsug-discuss] mmfind -ls and so forth Sent by: gpfsug-discuss-bounces@spectrumscale.org On the subject of mmfind, I would like to find files which have the misc attributes relevant to AFM. For instance files which have the attribute ‘v’ The file is newly created, not yet copied to home I can write a policy to do this, and I have a relevant policy written. However I would like to do this using mmfind, which seems a nice general utility. This syntax does not work: mmfind /hpc -eaWithValue MISC_ATTRIBUTES===v Before anyone says it, I am mixing up MISC_ATTRIBUTES and extended attributes! My question really is – has anyone done this sort of serch using mmfind? Thankyou From: gpfsug-discuss-bounces@spectrumscale.org [ mailto:gpfsug-discuss-bounces@spectrumscale.org] On Behalf Of Marc A Kaplan Sent: Wednesday, March 07, 2018 8:16 PM To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Subject: Re: [gpfsug-discuss] mmfind -ls and so forth As always when dealing with computers and potentially long running jobs, run a test on a handful of files first, so you can rapidly debug. Did you read the mmfind.README ? It mentions...that this sample utility "some user assembly required..." ... mmfindUtil_processOutputFile.c A utility to parse the "list file" produced by mmapplypolicy and to print it in a find-compatible format mmfind invokes it once mmapplypolicy begins to populate the "list file" mmfindUtil_processOutputFile.sampleMakefile copy to 'makefile', modify as needed, and run 'make' to compile mmfindUtil_processOutputFile.c This should produce a binary called mmfindUtil_processOutputFile mmfind will not be able to run until this utility has been compiled on the node from which you launch mmfind. Works for me... [root@n2 ilm]# ./mmfind /goo/zdbig -ls 2463649 256 drwxr-xr-x 2 root root 262144 Feb 9 11:41 /goo/zdbig 6804497 0 -rw-r--r-- 1 root root 0 Feb 9 11:41 /goo/zdbig/xy -- The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. Unless explicitly stated otherwise in the body of this communication or the attachment thereto (if any), the information is provided on an AS-IS basis without any express or implied warranties or liabilities. To the extent you are relying on this information, you are doing so at your own risk. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. Neither the sender nor the company/group of companies he or she represents shall be liable for the proper and complete transmission of the information contained in this communication, or for any delay in its receipt. _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listi...
Hi Marc, I test in production … just kidding. But - not kidding - I did read the entire mmfind.README, compiled the binary as described therein, and read the output of “mmfind -h”. But what I forgot was that when you run a bash shell script with “bash -x” it doesn’t show you the redirection you did to a file … and since the mmfind ran for ~5 days, including over a weekend, and including Monday which I took off from work to have our 16 1/2 year old Siberian Husky put to sleep, I simply forgot that in the script itself I had redirected the output to a file. Stupid of me, I know, but unlike Delusional Donald, I’ll admit my stupid mistakes. Thanks, and sorry. I will try the mmfind as you suggested in your previous response the next time I need to run one to see if that significantly improves the performance… Kevin On Mar 7, 2018, at 1:15 PM, Marc A Kaplan <makaplan@us.ibm.com<mailto:makaplan@us.ibm.com>> wrote: As always when dealing with computers and potentially long running jobs, run a test on a handful of files first, so you can rapidly debug. Did you read the mmfind.README ? It mentions...that this sample utility "some user assembly required..." ... mmfindUtil_processOutputFile.c A utility to parse the "list file" produced by mmapplypolicy and to print it in a find-compatible format mmfind invokes it once mmapplypolicy begins to populate the "list file" mmfindUtil_processOutputFile.sampleMakefile copy to 'makefile', modify as needed, and run 'make' to compile mmfindUtil_processOutputFile.c This should produce a binary called mmfindUtil_processOutputFile mmfind will not be able to run until this utility has been compiled on the node from which you launch mmfind. Works for me... [root@n2 ilm]# ./mmfind /goo/zdbig -ls 2463649 256 drwxr-xr-x 2 root root 262144 Feb 9 11:41 /goo/zdbig 6804497 0 -rw-r--r-- 1 root root 0 Feb 9 11:41 /goo/zdbig/xy _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org<http://spectrumscale.org> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgpfsug.org%2...
participants (3)
-
Buterbaugh, Kevin L -
John Hearns -
Marc A Kaplan
