Messages in this thread | | | Date | Wed, 8 Jan 2003 18:57:36 -0800 | From | William Lee Irwin III <> | Subject | Re: 2.4.20, .text.lock.swap cpu usage? (ibm x440) |
| |
On Mon, Jan 06, 2003 at 04:35:17PM -0700, Chris Wood wrote: > With some tips from James Cleverdon (IBM), I turned on some kernel > debugging and got the following from readprofile when the server was > having problems (truncated to the first 22 lines): > 16480 total 0.0138
Here are some monitoring tools that might help detect the cause of the situation.
bloatmon is the "back end"; there's no reason to run it directly.
bloatmeter shows the "least utilized" slabs.
bloatmost shows the largest slabs.
These sort of make for a top(1) for "lowmem pressure". Not everything is accounted there, though. The missing pieces are largely
(1) simultaneous temporary poll table allocations (2) pmd's (3) kernel stacks
Bill #!/bin/sh
while true do bloatmon < /proc/slabinfo \ | sort -rn -k 3,3 \ | head -22 sleep 60 echo done #!/bin/sh while : ; do grep -v '^slabinfo' /proc/slabinfo \ | bloatmon \ | sort -n -k 4,4 \ | head -22 sleep 5 echo done #!/usr/bin/awk -f BEGIN { printf "%18s %8s %8s %8s\n", "cache", "active", "alloc", "%util"; }
{ if ($3 != 0.0) { pct = 100.0 * $2 / $3; frac = (10000.0 * $2 / $3) % 100; } else { pct = 100.0; frac = 0.0; } active = ($2 * $4)/1024; alloc = ($3 * $4)/1024; if ((alloc - active) < 1.0) { pct = 100.0; frac = 0.0; } printf "%18s: %8dKB %8dKB %3d.%-2d\n", $1, active, alloc, pct, frac; }
| |