- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I want to know if it's possible to monitor a package power consumption on a deep C state like 6 or 7. I believe it isn't, because Core, Rings and Uncore are powered down. I am using RAPL to trace the instant consumption and my setup is a Lenovo Laptop L440 (intel core i5 4200m).
I am asking that because I want to confirm the accuracy of the RAPL feature with the idle power estimation info table you present on your processor datasheet for the C6/C7 State. Is there any other data with not so deep C states to compare the RAPL with? External measures are not an option!
Waiting for some opinions.
Best regards,
Carlos Portela
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Lots of the uncore is certainly powered down, but not all of it -- otherwise it would not know how to power back up! So it is not obvious that the RAPL stuff does not increment during deep C-states
Since RAPL reports "energy" and not "power", you can make the overhead arbitrarily small by extending the measurement interval. Just read the energy MSR, sleep() for a long time, then read it again. The TSC is non-stop, so it will give you an accurate wall time, and testing successively longer intervals should let you see whether the RAPL infrastructure is accumulating non-zero energy during the sleep() periods.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Lots of the uncore is certainly powered down, but not all of it -- otherwise it would not know how to power back up! So it is not obvious that the RAPL stuff does not increment during deep C-states
Since RAPL reports "energy" and not "power", you can make the overhead arbitrarily small by extending the measurement interval. Just read the energy MSR, sleep() for a long time, then read it again. The TSC is non-stop, so it will give you an accurate wall time, and testing successively longer intervals should let you see whether the RAPL infrastructure is accumulating non-zero energy during the sleep() periods.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
John McCalpin wrote:
Lots of the uncore is certainly powered down, but not all of it -- otherwise it would not know how to power back up! So it is not obvious that the RAPL stuff does not increment during deep C-states
Since RAPL reports "energy" and not "power", you can make the overhead arbitrarily small by extending the measurement interval. Just read the energy MSR, sleep() for a long time, then read it again. The TSC is non-stop, so it will give you an accurate wall time, and testing successively longer intervals should let you see whether the RAPL infrastructure is accumulating non-zero energy during the sleep() periods.
Thank you for your answer. Well, I believe that I didn't understand your suggestion that well. If I run the "sleep()" for a long time, the OS is always keeping the CPU up. I just run the C code below but, I didn't get the low consumption from C-State any close.
regards
result=read_msr(fd,MSR_PKG_ENERGY_STATUS); package_before=(double)result*energy_units; printf("Package energy before: %.6fJ\n",package_before); sleep(60); result=read_msr(fd,MSR_PKG_ENERGY_STATUS); package_after=(double)result*energy_units; printf("Package energy after: %.6f (%.6fJ consumed)\n", package_after,package_after-package_before);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is no guarantee that your system is configured to use the package C6 or C7 states....
On the Xeon E5 processors there are counters in the uncore Power Control Unit to count occupancy in the Package C6 and Package C7 states, but I don't know if there are similar counters on the Core i3/i5/i7 processors.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think the C7 state is being used. I left the system on idle during 2 hours and after it, I run the PowerTop tool and I found this(attached photo) info about the CPU.
So.. maybe a longer sleep would present me some better results?
EDIT: well, just did 30 mins sleep... and still 5W package consumption... so I believe it's not working... Package should be using C7 state too, on the powertop, right?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am not sure what answer you are expecting or what you are doing to calculate the answer you are getting....
Have you tried reading the RAPL energy register, leaving the computer completely alone for 30 minutes, and then reading it again?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry for the unclear explanation. Yes, I tried to read the MSR between 30 minutes "leaving computer alone". The average power consumption during that time was 5,3 Watts and, by the data sheet info that you can check on this post attachment, the CPU consumption should be near 2,5W.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The PowerTop screenshot shows 98.9% of the time in "Package C2", with 0% in "Package C3", "Package C6", or "Package C7" states.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I noticed that but I see that cores are reaching the C7 state. Doesn't that matter?
Is there anyway to configure package to use the C7 state?
Thank your for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Support for deep package C-states is likely to be determined by a combination of processor capability, system design decisions, system configuration decisions, BIOS settings, and OS settings. For example, in Section 4.2 of Volume 1 of the 4th generation Core family mobile processor datasheet (document 328901), there is an extended discussion of the rules for entering various package C states, which includes non-obvious settings such as the number of graphics displays, their resolution, and their self-refresh mode setting (e.g., Table 20).
I would look first for BIOS options relating to power savings and display configuration, then I would look into the OS power saving settings. If nothing is obvious, then the feature may not be supported by the platform (even though it is clearly supported by the processor).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'll give a look on it! Thanks for the help.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page