Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Rainer Weikusat Newsgroups: comp.os.linux.development.system Subject: Re: How to estimate System Memory Bandwidth by sampling Date: Wed, 13 Jul 2011 13:12:07 +0100 Lines: 25 Message-ID: <87mxgi4bxk.fsf@sapphire.mobileactivedefense.com> References: <92gq1790rij00c57o68guvvjjpmpa9qmu0@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: individual.net AdDCblTa5FAKTrk1fHCSig2Hb/w3NUlJ55asrh5NmT1zQYud4= Cancel-Lock: sha1:DU20JK+DlFRQJOyfBUOU57MNAMo= sha1:sdwzX8MqjsbiqGuxPz5P1Zq7eGA= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) Xref: x330-a1.tempe.blueboxinc.net comp.os.linux.development.system:216 Tim Roberts writes: > Xiaofeng Ye wrote: >> >>I need such a method to estimate Used System Memory Bandwidth. >>================================================ >>Get total amount of memory R/W bytes at Time1 and Time2. Then use the >>following formula to estimate Used System Memory Bandwidth. >> UsedSystemMemoryBandwidth = (BytesAtTime2 - BytesAtTime1) / (Time2 >>- Time1) >>================================================ >> >>But I have not found any system metrics by which I can get the total >>amount of memory R/W bytes. BTW, I'm not going to use CPU's PMU >>(performance monitoring unit). >> >>I need some advice how to get memory R/W bytes from a user mode >>program or from a kernel module. (Hook is OK too) > > That's impossible. This is not a statistic that software can keep track > of. Why this? All which seems to be needed for that is access to an area of physical memory configured as uncached and some hardware timer that can be used to measure the time it takes to execute some 'block memory access loop'.