| <?xml version='1.0' encoding='utf-8' ?> |
| <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ |
| ]> |
| <chapter id="xfs-monitoring"> |
| <title>XFS Monitoring</title> |
| <section> |
| <title>Monitoring</title> |
| <para>A lot of performance and utilisation data can be collected</para> |
| <itemizedlist> |
| <listitem><para>Generic filesystem and memory statistics</para></listitem> |
| <listitem><para>Specific XFS metrics</para></listitem> |
| </itemizedlist> |
| <para>There are a range of tools that can be used</para> |
| <itemizedlist> |
| <listitem><para>/proc/*</para></listitem> |
| <listitem><para>sar</para></listitem> |
| <listitem><para>vmstat</para></listitem> |
| <listitem><para>top, topsys</para></listitem> |
| <listitem><para>Performance Co-Pilot</para></listitem> |
| <listitem><para>etc.</para></listitem> |
| </itemizedlist> |
| </section> |
| <section> |
| <title>Inodes</title> |
| <para><programlisting>watch grep inode /proc/slabinfo</programlisting></para> |
| <para><programlisting>slabtop -s c</programlisting></para> |
| <itemizedlist> |
| <listitem><para>Monitor the slab</para></listitem> |
| </itemizedlist> |
| <para><programlisting>sar -v</programlisting></para> |
| <itemizedlist> |
| <listitem><para>inode statistics collected by sadc</para></listitem> |
| </itemizedlist> |
| </section> |
| |
| <section> |
| <title>PCP Inode Metrics</title> |
| <para><programlisting> |
| ig_attempts # of looks for inode in memory |
| ig_found # of times inode found in memory |
| ig_frecycle # of fails because inode was busy |
| ig_misses # of times had to go to disk for inode |
| ig_dup # times missed but found from another |
| ig_reclaims # of times recyled the inode's memory |
| ig_attrchngx # of times changed inode attributes |
| iflush_count # of times inodes are being flushed |
| icluster_flushcnt # of times inodes clustered |
| icluster_flushinode # of times not able to inode cluster</programlisting></para> |
| </section> |
| |
| <section> |
| <title>PCP Directory Metrics</title> |
| <para><programlisting> |
| lookup # of file name directory lookups |
| create # of directory entry creations |
| remove # of directory entry removes |
| getdents # of "getdents" operations</programlisting></para> |
| </section> |
| |
| <section> |
| <title>PCP File Attribute Metrics</title> |
| <para><programlisting> |
| attr.get # of "get" operations |
| attr.set # of "set" operations |
| attr.remove # of "remove" operations |
| attr.list # of "list" operations</programlisting></para> |
| </section> |
| |
| <section> |
| <title>PCP Allocation Metrics</title> |
| <para><programlisting> |
| allocs.alloc_extent # of extents allocated |
| allocs.alloc_block # of blocks allocated |
| allocs.free_extent # of extents freed |
| allocs.free_block # of blocks freed |
| alloc_btree.lookup # of allocation btree lookups |
| alloc_bteee.compare # of compares in alloc btree lookup |
| alloc_btree.insrec # of extent record inserts in btree |
| alloc_btree.delrec # of extent record deletes in btree</programlisting></para> |
| </section> |
| |
| <section> |
| <title>PCP Block Map Metrics</title> |
| <para><programlisting> |
| block_map.read_ops # of block map reads |
| block_map.write_ops # of block map writes |
| block_map.unmap # of block delete operations |
| block_map.add_exlist # of extent list insertions for files |
| block_map.del_exlist # of extent list deletions |
| block_map.look_exlist # of extent list lookups |
| block_map.cmp_exlist # of extent list compares |
| bmap_btree.lookup # of block map btree lookups |
| bmap_btree.compare # of block map compares |
| bmap_btree.insrec # of block map insertions |
| bmap_btree.delrec # of block map deletions</programlisting></para> |
| </section> |
| |
| <section> |
| <title>PCP Journaling Metrics</title> |
| <para><programlisting> |
| transaction.sync # of transactions waiting to be committed |
| transaction.async # of async transactions waiting |
| transaction.empty # of transactions that did not do anything |
| log.writes # of log buffer writes |
| log.blocks # of log blocks written |
| log.noiclogs # of log entry attempts during memory flush |
| log.force # of calls to xfs_log_force |
| log.force_sleep # of calls to xs_log_force_sleep</programlisting></para> |
| </section> |
| |
| <section> |
| <title>PCP AIL Metrics</title> |
| <para><programlisting> |
| push_ail.pushes # of times the AIL is moved forward |
| push_ail.success # of times sucessful |
| push_ail.pushbuf # of times locked "pushbuf" called |
| push_ail.pinned # of times pinned |
| push_ail.locked # of times locked |
| push_ail.flushing # of times ail was flushing |
| push_ail.restarts # of log write restarts |
| push_ail.flush # of times a log was forced</programlisting></para> |
| </section> |
| |
| <section> |
| <title>PCP Quota Metrics</title> |
| <para><programlisting> |
| reclaims # of disk quota reclaims |
| reclaims_misses # of disk quota reclaim misses |
| dquot_dups # of duplicates |
| cachemisses # of times disk quota misses cache |
| cachehits # of times disk quota in cache |
| wants # of times dqwants called |
| shake_reclaims # of shaked reclaims |
| inact_reclaims # of inactive data reclaims</programlisting></para> |
| </section> |
| |
| <section> |
| <title>xfsstats</title> |
| <para>xfsmisc/xfsstats.pl -f</para> |
| </section> |
| </chapter> |
| |