sysctl -a | grep freq
...
dev.cpu.0.freq: 2001
dev.cpu.0.freq_levels: 2001/95000 2000/95000 1900/89224 1800/83561 1700/78011 1600/72573 1500/67246 1400/62042 1300/56932 1200/51931
...
performance_cpu_freq="HIGH"
pmcstat -s unhalted-core-cycles -w 1
The command that you have added, was it to achieve turbo boost?
I am trying rather to drop the frequency when idle, where can I find the full list of the commands to control scaling?
performance_cpu_freq
(str) CPU clock frequency to use while on AC power. The
string ``LOW'' indicates that cpufreq(4) should use the low-
est frequency available while ``HIGH'' indicates that the
highest frequency (less power savings) should be used.
sysctl dev.cpu.0.freq=2001
powerd_enable="YES"
powerd_flags="-n hiadaptive -a hiadaptive -m 2000 -M 4100"
[root@leo00] /etc# ps lmax|grep powerd
0 1919 1 0 20 0 52840 6400 select I - 0:00.01 /usr/local/libexec/upowerd
0 3761 3694 0 20 0 18840 2508 piperd S+ 2 0:00.00 grep powerd
0 857 1 0 20 0 14504 1928 select Ss - 0:00.09 /usr/sbin/powerd -b hiadaptive -a hiadaptive -n hiadaptive -m 2000 -M 4100
That command has done nothing for me. Still cannot get the stats, same error.Curiously, that command works on my 10.2-STABLE machine, but fails as you indicate on my newly installed 10.3-Release machine.
The solution waskldload hwpmc
and it works as expected
powerd -v
and voila! I saw it momentarily dropping to 3800 and 2000, but only for split second and every tiny spike in CPU kicked it back up to 4100, so it practically stayed at 4100 90% of the time and I did not have a chance to notice the short-term drops in frequency using the buggy KDE System Load Viewer applet.Id Refs Address Size Name
1 172 0xffffffff80200000 152b000 kernel
2 1 0xffffffff819da000 2504e drm.ko
3 2 0xffffffff81a00000 719ed drm2.ko
4 5 0xffffffff81a72000 5675 iicbus.ko
5 3 0xffffffff81a78000 6899e vboxdrv.ko
6 3 0xffffffff81ae1000 324f5 crypto.ko
7 1 0xffffffff81b14000 4f19 aesni.ko
8 1 0xffffffff81b19000 1f928 geom_eli.ko
9 1 0xffffffff81b39000 2e15c9 zfs.ko
10 2 0xffffffff81e1b000 53ae opensolaris.ko
11 1 0xffffffff81e21000 10c9a tmpfs.ko
12 1 0xffffffff81e32000 8cf20 linux.ko
13 5 0xffffffff81ebf000 adff linux_common.ko
14 1 0xffffffff81eca000 229b1 geom_journal.ko
15 1 0xffffffff81eed000 22b1b geom_mirror.ko
16 1 0xffffffff81f10000 63b2 ums.ko
17 1 0xffffffff82021000 9fbb linprocfs.ko
18 2 0xffffffff8202b000 429e libiconv.ko
19 1 0xffffffff82030000 1566 libmchain.ko
20 1 0xffffffff82032000 7da msdosfs_iconv.ko
21 1 0xffffffff82033000 31cf7 if_bwn.ko
22 1 0xffffffff82065000 6ed0 siba_bwn.ko
23 1 0xffffffff8206c000 1faa7 if_bwi.ko
24 1 0xffffffff8208c000 273c runfw.ko
25 1 0xffffffff8208f000 476a cuse4bsd.ko
26 1 0xffffffff82094000 66ee sem.ko
27 1 0xffffffff8209b000 22d9 geom_uzip.ko
28 1 0xffffffff8209e000 56f6 fdescfs.ko
29 1 0xffffffff820a4000 55ec linsysfs.ko
30 1 0xffffffff820aa000 2e58a iwn4965fw.ko
31 1 0xffffffff820d9000 52db3 iwn1000fw.ko
32 1 0xffffffff8212c000 53a21 iwn5000fw.ko
33 1 0xffffffff82180000 52d43 iwn5150fw.ko
34 1 0xffffffff821d3000 6f71f iwn6000fw.ko
35 1 0xffffffff82243000 a5d05 iwn6000g2afw.ko
36 1 0xffffffff822e9000 70fc3 iwn6000g2bfw.ko
37 1 0xffffffff8235a000 73265 iwn6050fw.ko
38 1 0xffffffff823ce000 3749 acpi_video.ko
39 1 0xffffffff823d2000 ddae fuse.ko
40 1 0xffffffff823e0000 2b5c uhid.ko
41 1 0xffffffff823e3000 11dff ipfw.ko
42 2 0xffffffff823f5000 2b32 vboxnetflt.ko
43 2 0xffffffff823f8000 bea1 netgraph.ko
44 1 0xffffffff82404000 41c2 ng_ether.ko
45 1 0xffffffff82409000 3fd4 vboxnetadp.ko
46 1 0xffffffff8240d000 377a9 linux64.ko
47 1 0xffffffff82445000 ca7e iscsi.ko
48 1 0xffffffff82452000 7835 autofs.ko
49 1 0xffffffff8245a000 eb14a radeonkms.ko
50 1 0xffffffff82546000 1c7e iic.ko
51 1 0xffffffff82548000 1de3 iicbb.ko
52 1 0xffffffff8254a000 28ee radeonkmsfw_PITCAIRN_pfp.ko
53 1 0xffffffff8254d000 28f3 radeonkmsfw_PITCAIRN_me.ko
54 1 0xffffffff82550000 28ec radeonkmsfw_PITCAIRN_ce.ko
55 1 0xffffffff82553000 2776 radeonkmsfw_PITCAIRN_rlc.ko
56 1 0xffffffff82556000 80d9 radeonkmsfw_PITCAIRN_mc.ko
57 1 0xffffffff8255f000 b3df if_lagg.ko
kldload hwpmc
adds another line to the output of kldstat:58 1 0xffffffff8256b000 1a610 hwpmc.ko
[root@leo00] ~# pmcstat -s unhalted-core-cycles -w 1
pmcstat: ERROR: Cannot allocate system-mode pmc with specification "unhalted-core-cycles": Invalid argument
[leo@leo00] ~% sudo pmccontrol -L
SOFT
PAGE_FAULT.WRITE
CLOCK.PROF
LOCK.FAILED
CLOCK.HARD
CLOCK.STAT
PAGE_FAULT.ALL
PAGE_FAULT.READ
TSC
TSC
K8
FP_DISPATCHED_FPU_OPS
FP_CYCLES_WITH_NO_FPU_OPS_RETIRED
FP_DISPATCHED_FPU_FAST_FLAG_OPS
LS_SEGMENT_REGISTER_LOAD
LS_MICROARCHITECTURAL_RESYNC_BY_SELF_MODIFYING_CODE
LS_MICROARCHITECTURAL_RESYNC_BY_SNOOP
LS_BUFFER2_FULL
LS_LOCKED_OPERATION
LS_MICROARCHITECTURAL_LATE_CANCEL
LS_RETIRED_CFLUSH_INSTRUCTIONS
LS_RETIRED_CPUID_INSTRUCTIONS
DC_ACCESS
DC_MISS
DC_REFILL_FROM_L2
DC_REFILL_FROM_SYSTEM
DC_COPYBACK
DC_L1_DTLB_MISS_AND_L2_DTLB_HIT
DC_L1_DTLB_MISS_AND_L2_DTLB_MISS
DC_MISALIGNED_DATA_REFERENCE
DC_MICROARCHITECTURAL_LATE_CANCEL
DC_MICROARCHITECTURAL_EARLY_CANCEL
DC_ONE_BIT_ECC_ERROR
DC_DISPATCHED_PREFETCH_INSTRUCTIONS
DC_DCACHE_ACCESSES_BY_LOCKS
BU_CPU_CLK_UNHALTED
BU_INTERNAL_L2_REQUEST
BU_FILL_REQUEST_L2_MISS
BU_FILL_INTO_L2
IC_FETCH
IC_MISS
IC_REFILL_FROM_L2
IC_REFILL_FROM_SYSTEM
IC_L1_ITLB_MISS_AND_L2_ITLB_HIT
IC_L1_ITLB_MISS_AND_L2_ITLB_MISS
IC_MICROARCHITECTURAL_RESYNC_BY_SNOOP
IC_INSTRUCTION_FETCH_STALL
IC_RETURN_STACK_HIT
IC_RETURN_STACK_OVERFLOW
FR_RETIRED_X86_INSTRUCTIONS
FR_RETIRED_UOPS
FR_RETIRED_BRANCHES
FR_RETIRED_BRANCHES_MISPREDICTED
FR_RETIRED_TAKEN_BRANCHES
FR_RETIRED_TAKEN_BRANCHES_MISPREDICTED
FR_RETIRED_FAR_CONTROL_TRANSFERS
FR_RETIRED_RESYNCS
FR_RETIRED_NEAR_RETURNS
FR_RETIRED_NEAR_RETURNS_MISPREDICTED
FR_RETIRED_TAKEN_BRANCHES_MISPREDICTED_BY_ADDR_MISCOMPARE
FR_RETIRED_FPU_INSTRUCTIONS
FR_RETIRED_FASTPATH_DOUBLE_OP_INSTRUCTIONS
FR_INTERRUPTS_MASKED_CYCLES
FR_INTERRUPTS_MASKED_WHILE_PENDING_CYCLES
FR_TAKEN_HARDWARE_INTERRUPTS
FR_DECODER_EMPTY
FR_DISPATCH_STALLS
FR_DISPATCH_STALL_FROM_BRANCH_ABORT_TO_RETIRE
FR_DISPATCH_STALL_FOR_SERIALIZATION
FR_DISPATCH_STALL_FOR_SEGMENT_LOAD
FR_DISPATCH_STALL_WHEN_REORDER_BUFFER_IS_FULL
FR_DISPATCH_STALL_WHEN_RESERVATION_STATIONS_ARE_FULL
FR_DISPATCH_STALL_WHEN_FPU_IS_FULL
FR_DISPATCH_STALL_WHEN_LS_IS_FULL
FR_DISPATCH_STALL_WHEN_WAITING_FOR_ALL_TO_BE_QUIET
FR_DISPATCH_STALL_WHEN_FAR_XFER_OR_RESYNC_BRANCH_PENDING
FR_FPU_EXCEPTIONS
FR_NUMBER_OF_BREAKPOINTS_FOR_DR0
FR_NUMBER_OF_BREAKPOINTS_FOR_DR1
FR_NUMBER_OF_BREAKPOINTS_FOR_DR2
FR_NUMBER_OF_BREAKPOINTS_FOR_DR3
NB_MEMORY_CONTROLLER_PAGE_ACCESS_EVENT
NB_MEMORY_CONTROLLER_PAGE_TABLE_OVERFLOW
NB_MEMORY_CONTROLLER_DRAM_COMMAND_SLOTS_MISSED
NB_MEMORY_CONTROLLER_TURNAROUND
NB_MEMORY_CONTROLLER_BYPASS_SATURATION
NB_SIZED_COMMANDS
NB_PROBE_RESULT
NB_HT_BUS0_BANDWIDTH
NB_HT_BUS1_BANDWIDTH
NB_HT_BUS2_BANDWIDTH