is it possible via some set of mmdiag --waiters or mmfsadm dump ? to figure out which files or directories access (whether it's read or write) is causing long-er waiters? in all my looking i have not been able to get that information out of various diagnostic commands. thanks, damir
The short answer is there is no easy way to determine what file/directory a waiter may be related. Generally, it is not necessary to know the file/directory since a properly sized/configured cluster should not have long waiters occurring, unless there is some type of failure in the cluster. If you were to capture sufficient information across the cluster you might be able to work out the file/directory involved in a long waiter but it would take either trace, or combing through lots of internal data structures. It would be helpful to know more details about your cluster to provide suggestions for what may be causing the long waiters. I presume you are seeing them on a regular basis and would like to understand why they are occurring. Regards, The Spectrum Scale (GPFS) team ------------------------------------------------------------------------------------------------------------------ If you feel that your question can benefit other users of Spectrum Scale (GPFS), then please post it to the public IBM developerWroks Forum at https://www.ibm.com/developerworks/community/forums/html/forum?id=11111111-0... . If your query concerns a potential software error in Spectrum Scale (GPFS) and you have an IBM software maintenance contract please contact 1-800-237-5511 in the United States or your local IBM Service Center in other countries. The forum is informally monitored as time permits and should not be used for priority messages to the Spectrum Scale (GPFS) team. From: Damir Krstic <damir.krstic@gmail.com> To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Date: 10/10/2019 04:44 PM Subject: [EXTERNAL] [gpfsug-discuss] waiters and files causing waiters Sent by: gpfsug-discuss-bounces@spectrumscale.org is it possible via some set of mmdiag --waiters or mmfsadm dump ? to figure out which files or directories access (whether it's read or write) is causing long-er waiters? in all my looking i have not been able to get that information out of various diagnostic commands. thanks, damir_______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listi...
If the waiters are on a compute node and there is not much user work running there, then the open files listed by lsof will probably be the culprits. On Thu, Oct 10, 2019 at 1:44 PM Damir Krstic <damir.krstic@gmail.com> wrote:
is it possible via some set of mmdiag --waiters or mmfsadm dump ? to figure out which files or directories access (whether it's read or write) is causing long-er waiters?
in all my looking i have not been able to get that information out of various diagnostic commands.
thanks, damir _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
I’ll dig through my notes. I had a similar situation and an engineer taught me how to do it. It’s a bit involved though. Not something you’d bother with for something transient. -- ____ || \\UTGERS, |---------------------------*O*--------------------------- ||_// the State | Ryan Novosielski - novosirj@rutgers.edu<mailto:novosirj@rutgers.edu> || \\ University | Sr. Technologist - 973/972.0922 (2x0922) ~*~ RBHS Campus || \\ of NJ | Office of Advanced Research Computing - MSB C630, Newark `' On Oct 10, 2019, at 16:44, Damir Krstic <damir.krstic@gmail.com> wrote: is it possible via some set of mmdiag --waiters or mmfsadm dump ? to figure out which files or directories access (whether it's read or write) is causing long-er waiters? in all my looking i have not been able to get that information out of various diagnostic commands. thanks, damir _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
I think it depends on the type of deadlock. For example, if hung nodes are the cause of the deadlock. I don't think there will be any files to go after. I've seen that it is possible in certain cases but no guarantees. When the deadlock is detected you can look at the internaldump that gets created on the deadlock node, for example: ===== dump deadlock ===== Current time 2019-09-24_10:17:30-0400 Waiting 904.5729 sec since 10:02:25, on node aresnode7132, thread 3584968 SyncFSWorkerThread: on ThCond 0x18042226DB8 (LkObjCondvar), reason 'waiting for RO lock' Then you search in the same file for the ThCond further down. You'll most likely see that it is associated with a mutex ===== dump condvar ===== Current time 2019-09-24_10:17:32-0400 . . 'LkObjCondvar' at 0x18042226DB8 (0xFFFFC90042226DB8) (mutex 'InodeCacheObjMutex' at 0x18042226C08 (0xFFFFC90042226C08 PTR_OK)) waitCount 1 condvarEventWordP 0xFFFF880DB4AAF088 Then you'll search for the that mutex in the same file ===== dump selected_files ===== Current time 2019-09-24_10:17:32-0400 Files in stripe group gpfs0: Selected: LkObj::mostWanted: 0x18042226D80 lock_state=0x2000000000000000 xlock_state=0x0 lock_flags=0x11 OpenFile: 429E985A0BFE280A:000000008285ECBD:0000000000000000 @ 0x18042226BD8 cach 1 ref 1 hc 3 tc 6 mtx 0x18042226C08 Inode: valid eff token xw @ 0x18042226D80, ctMode xw seq 175 lock state [ xw ] x [] flags [ dmn wka ] writer 39912 hasWaiters 1 0 Mnode: valid eff token xw @ 0x18042226DD0, ctMode xw seq 175 DMAPI: invalid eff token nl @ 0x18042226D30, ctMode nl seq 174 SMBOpen: valid eff token (A: M D: ) @ 0x18042226C60, ctMode (A: M D: ) Flags 0x30 (pfro+pfxw) seq 175 lock state [ (nil) D: ] x [] flags [ ] SMBOpLk: valid eff token wf @ 0x18042226CD0, ctMode wf Flags 0x30 (pfro+pfxw) seq 175 BR: @ 0x18042226E30, ctMode nl Flags 0x10 (pfro) seq 175 treeP 0x18048C1EFB8 C btFastTrack 0 1 ranges mode RO/XW: BLK [0,INF] mode XW node <1335> Fcntl: @ 0x18042226E58, ctMode nl Flags 0x30 (pfro+pfxw) seq 175 treeP 0x1801EBA7EE8 C btFastTrack 0 1 ranges mode RO/XW: BLK [0,INF] mode XW node <1335> * inode 2189814973* snap 0 USERFILE nlink 1 genNum 0x2710E0CC mode 0200100644: -rw-r--r-- tmmgr node <c1n4> (other) metanode <c1n1335> (me) fail+panic count -1 flags 0x0, remoteStart 0 remoteCnt 0 localCnt 0 lastFrom 65535 switchCnt 0 BRL nXLocksOrRelinquishes 6 vfsReference 1 dioCount 0 dioFlushNeeded 1 dioSkipCounter 0 dioReentryThreshold 0.000000 lastAllocLsn 0xB8740C5E metadataFlushCount 2, metadataFlushWaiters 0/0, metadataCommitVersion 1 bufferListCount 1 bufferListChangeCount 1 dirty status: dirty fileDirty 1 fileDirtyOrUncommitted 1 dirtiedSyncNum 81078 inodeValid 1 inodeDirtyCount 5 objectVersion 1 mtimeDirty 1 flushVersion 8983 mnodeChangeCount 1 dirtyDataBufs 1 block size code 5 (32 subblocksPerFileBlock) dataBytesPerFileBlock 4194304 fileSize 10213 synchedFileSize 0 indirectionLevel 1 atime 1569333733.493440000 mtime 1569333742.784833000 ctime 1569333742.784712266 crtime 1569333733.493440000 * owner uid 6572 gid 3047* If you were lucky and all of these were found you can get the inode and the uid/gid of the owner of the file. If you happen to catch it quick enough you'll be able to find the file with lsof. Otherwise later with an ilm policy run if the file has not been deleted by the user. Behrooz On Thu, Oct 10, 2019 at 7:05 PM Ryan Novosielski <novosirj@rutgers.edu> wrote:
I’ll dig through my notes. I had a similar situation and an engineer taught me how to do it. It’s a bit involved though. Not something you’d bother with for something transient.
-- ____ || \\UTGERS, |---------------------------*O*--------------------------- ||_// the State | Ryan Novosielski - novosirj@rutgers.edu || \\ University | Sr. Technologist - 973/972.0922 (2x0922) ~*~ RBHS Campus || \\ of NJ | Office of Advanced Research Computing - MSB C630, Newark `'
On Oct 10, 2019, at 16:44, Damir Krstic <damir.krstic@gmail.com> wrote:
is it possible via some set of mmdiag --waiters or mmfsadm dump ? to figure out which files or directories access (whether it's read or write) is causing long-er waiters?
in all my looking i have not been able to get that information out of various diagnostic commands.
thanks, damir _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
_______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
Found my notes on this; very similar to what Behrooz was saying. This here is from “mmfsadm dump waiters,selected_files”; as you can see here, we’re looking at thread 29168. Apparently below, “inodeFlushHolder” corresponds to that same thread in the case I was looking at. You could then look up the inode with “tsfindinode -i <inode> <fsname>”, so like for the below, "tsfindinode -i 41538053 /gpfs/cache” on our system. ===== dump waiters ==== Current time 2019-05-01_13:48:26-0400 Waiting 0.1669 sec since 13:48:25, monitored, thread 29168 FileBlockWriteFetchHandlerThread: on ThCond 0x7F55E40014C8 (MsgRecordCondvar), reason 'RPC wait' for quotaMsgRequestShare on node 192.168.33.7 <c1n1> ===== dump selected_files ===== Current time 2019-05-01_13:48:36-0400 ... OpenFile: 4E044E5B0601A8C0:000000000279D205:0000000000000000 @ 0x1806AC5EAC8 cach 1 ref 1 hc 2 tc 6 mtx 0x1806AC5EAF8 Inode: valid eff token xw @ 0x1806AC5EC70, ctMode xw seq 170823 lock state [ wf: 1 ] x [] flags [ ] Mnode: valid eff token xw @ 0x1806AC5ECC0, ctMode xw seq 170823 DMAPI: invalid eff token nl @ 0x1806AC5EC20, ctMode nl seq 170821 SMBOpen: valid eff token (A:RMA D: ) @ 0x1806AC5EB50, ctMode (A:RMA D: ) seq 170823 lock state [ M(2) D: ] x [] flags [ ] SMBOpLk: valid eff token wf @ 0x1806AC5EBC0, ctMode wf Flags 0x30 (pfro+pfxw) seq 170822 BR: @ 0x1806AC5ED20, ctMode nl Flags 0x10 (pfro) seq 170823 treeP 0x18016189C08 C btFastTrack 0 1 ranges mode RO/XW: BLK [0,INF] mode XW node <403> Fcntl: @ 0x1806AC5ED48, ctMode nl Flags 0x30 (pfro+pfxw) seq 170823 treeP 0x18031A5E3F8 C btFastTrack 0 1 ranges mode RO/XW: BLK [0,INF] mode XW node <403> inode 41538053 snap 0 USERFILE nlink 1 genNum 0x3CC2743F mode 0200100600: -rw------- tmmgr node <c1n1> (other) metanode <c1n403> (me) fail+panic count -1 flags 0x0, remoteStart 0 remoteCnt 0 localCnt 177 lastFrom 65535 switchCnt 0 locks held in mode xw: 0x1806AC5F238: 0x0-0xFFF tid 15954 gbl 0 mode xw rel 0 BRL nXLocksOrRelinquishes 285 vfsReference 1 dioCount 0 dioFlushNeeded 1 dioSkipCounter 0 dioReentryThreshold 0.000000 hasWriterInstance 1 inodeFlushFlag 1 inodeFlushHolder 29168 openInstCount 1 metadataFlushCount 2, metadataFlushWaiters 0/0, metadataCommitVersion 1 bufferListCount 1 bufferListChangeCount 3 dirty status: flushed dirtiedSyncNum 1477623 SMB oplock state: nWriters 1 indBlockDeallocLock: sharedLockWord 1 exclLockWord 0 upgradeWaitingS_W 0 upgradeWaitingW_X 0 inodeValid 1 objectVersion 240 flushVersion 8086700 mnodeChangeCount 1 block size code 5 (32 subblocksPerFileBlock) dataBytesPerFileBlock 4194304 fileSize 0 synchedFileSize 0 indirectionLevel 1 atime 1556732911.496160000 mtime 1556732911.496479000 ctime 1556732911.496479000 crtime 1556732911.496160000 owner uid 169589 gid 169589
On Oct 10, 2019, at 4:43 PM, Damir Krstic <damir.krstic@gmail.com> wrote:
is it possible via some set of mmdiag --waiters or mmfsadm dump ? to figure out which files or directories access (whether it's read or write) is causing long-er waiters?
in all my looking i have not been able to get that information out of various diagnostic commands.
thanks, damir _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
Right for the example from Ryan(and according to the thread name, you know that it is writing to a file or directory), but for other cases, it may take more steps to figure out what access to which file is causing the long waiters(i.e., when mmap is being used on some nodes, or token revoke pending from some node, and etc.). Regards, The Spectrum Scale (GPFS) team ------------------------------------------------------------------------------------------------------------------ If you feel that your question can benefit other users of Spectrum Scale (GPFS), then please post it to the public IBM developerWroks Forum at https://www.ibm.com/developerworks/community/forums/html/forum?id=11111111-0... . If your query concerns a potential software error in Spectrum Scale (GPFS) and you have an IBM software maintenance contract please contact 1-800-237-5511 in the United States or your local IBM Service Center in other countries. The forum is informally monitored as time permits and should not be used for priority messages to the Spectrum Scale (GPFS) team. From: Ryan Novosielski <novosirj@rutgers.edu> To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Date: 2019/10/18 09:18 AM Subject: [EXTERNAL] Re: [gpfsug-discuss] waiters and files causing waiters Sent by: gpfsug-discuss-bounces@spectrumscale.org Found my notes on this; very similar to what Behrooz was saying. This here is from “mmfsadm dump waiters,selected_files”; as you can see here, we’re looking at thread 29168. Apparently below, “inodeFlushHolder” corresponds to that same thread in the case I was looking at. You could then look up the inode with “tsfindinode -i <inode> <fsname>”, so like for the below, "tsfindinode -i 41538053 /gpfs/cache” on our system. ===== dump waiters ==== Current time 2019-05-01_13:48:26-0400 Waiting 0.1669 sec since 13:48:25, monitored, thread 29168 FileBlockWriteFetchHandlerThread: on ThCond 0x7F55E40014C8 (MsgRecordCondvar), reason 'RPC wait' for quotaMsgRequestShare on node 192.168.33.7 <c1n1> ===== dump selected_files ===== Current time 2019-05-01_13:48:36-0400 ... OpenFile: 4E044E5B0601A8C0:000000000279D205:0000000000000000 @ 0x1806AC5EAC8 cach 1 ref 1 hc 2 tc 6 mtx 0x1806AC5EAF8 Inode: valid eff token xw @ 0x1806AC5EC70, ctMode xw seq 170823 lock state [ wf: 1 ] x [] flags [ ] Mnode: valid eff token xw @ 0x1806AC5ECC0, ctMode xw seq 170823 DMAPI: invalid eff token nl @ 0x1806AC5EC20, ctMode nl seq 170821 SMBOpen: valid eff token (A:RMA D: ) @ 0x1806AC5EB50, ctMode (A:RMA D: ) seq 170823 lock state [ M(2) D: ] x [] flags [ ] SMBOpLk: valid eff token wf @ 0x1806AC5EBC0, ctMode wf Flags 0x30 (pfro+pfxw) seq 170822 BR: @ 0x1806AC5ED20, ctMode nl Flags 0x10 (pfro) seq 170823 treeP 0x18016189C08 C btFastTrack 0 1 ranges mode RO/XW: BLK [0,INF] mode XW node <403> Fcntl: @ 0x1806AC5ED48, ctMode nl Flags 0x30 (pfro+pfxw) seq 170823 treeP 0x18031A5E3F8 C btFastTrack 0 1 ranges mode RO/XW: BLK [0,INF] mode XW node <403> inode 41538053 snap 0 USERFILE nlink 1 genNum 0x3CC2743F mode 0200100600: -rw------- tmmgr node <c1n1> (other) metanode <c1n403> (me) fail+panic count -1 flags 0x0, remoteStart 0 remoteCnt 0 localCnt 177 lastFrom 65535 switchCnt 0 locks held in mode xw: 0x1806AC5F238: 0x0-0xFFF tid 15954 gbl 0 mode xw rel 0 BRL nXLocksOrRelinquishes 285 vfsReference 1 dioCount 0 dioFlushNeeded 1 dioSkipCounter 0 dioReentryThreshold 0.000000 hasWriterInstance 1 inodeFlushFlag 1 inodeFlushHolder 29168 openInstCount 1 metadataFlushCount 2, metadataFlushWaiters 0/0, metadataCommitVersion 1 bufferListCount 1 bufferListChangeCount 3 dirty status: flushed dirtiedSyncNum 1477623 SMB oplock state: nWriters 1 indBlockDeallocLock: sharedLockWord 1 exclLockWord 0 upgradeWaitingS_W 0 upgradeWaitingW_X 0 inodeValid 1 objectVersion 240 flushVersion 8086700 mnodeChangeCount 1 block size code 5 (32 subblocksPerFileBlock) dataBytesPerFileBlock 4194304 fileSize 0 synchedFileSize 0 indirectionLevel 1 atime 1556732911.496160000 mtime 1556732911.496479000 ctime 1556732911.496479000 crtime 1556732911.496160000 owner uid 169589 gid 169589
On Oct 10, 2019, at 4:43 PM, Damir Krstic <damir.krstic@gmail.com> wrote:
is it possible via some set of mmdiag --waiters or mmfsadm dump ? to figure out which files or directories access (whether it's read or write) is causing long-er waiters?
in all my looking i have not been able to get that information out of various diagnostic commands.
thanks, damir _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org
https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listi... _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listi...
participants (5)
-
Alex Chekholko -
Behrooz Amirzadeh -
Damir Krstic -
IBM Spectrum Scale -
Ryan Novosielski
