Date: Wed, 11 Jan 2006 15:12:17 +1100 From: Peter Jeremy <PeterJeremy@optushome.com.au> To: kamal kc <kamal_ckk@yahoo.com> Cc: freebsd <freebsd-hackers@freebsd.org> Subject: Re: using get_system_info() - obtaining system load averages Message-ID: <20060111041217.GM60380@cirb503493.alcatel.com.au> In-Reply-To: <20060111015504.48492.qmail@web30015.mail.mud.yahoo.com> References: <43C3DE68.70303@oxygen.az> <20060111015504.48492.qmail@web30015.mail.mud.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 2006-Jan-10 17:55:04 -0800, kamal kc wrote: >after i put my code i got a very high amount of interrupts (irq 21: >xl1 interrupts) that overloads the cpu withing seconds if i pump >about 4Mbps traffic through it. > >so i thought as a temp solution that i could turn off the compression >if ever the cpu gets overloaded and that's it. Load average isn't a good way of doing this. averunnable.ldavg[0] represents an exponential decay average of the run queue length that is updated (roughly) every 5 seconds with a 1 minute period. This is useless at measuring short-term CPU load. cp_time[] is probably a better choice for you - it uses statclock to report the CPU utilisation (every statclock interval, one element of the array is incremented) so you can (fairly) immediately detect if you have overloaded the CPU (for some definition of "overload"). -- Peter Jeremy
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060111041217.GM60380>