VOGONS


CPU Tuning, Throttling

Topic actions

First post, by PARUS

User metadata
Rank Oldbie
Rank
Oldbie

MSRED.COM, works with any CPU which has MSR.

For Core 2 there are two MSR which control multiplier.

0x194 r/w controls MAXIMUM and NOMINAL (they are equal) multiplier. Command and keys for write:
MSRED W 194 1XXYY, where XX is multiplier and YY is voltage.
Examples:
MSRED W 194 10A28 - maximum mul is 10, maximum vol is 1,3250v.
MSRED W 194 11228 - maximum mul is 18, maximum vol is 1,3250v.

0x199 r/w controls CURRENT multiplier. Command and keys:
MSRED W 199 XXYY
Examples:
MSRED W 199 728 - current mul is 7, current vol is 1,3250v.
MSRED W 199 F28 - current mul is 15, current vol is 1,3250v.

And one r/o MSR 0x198 for display real values, command:
MSRED R 198

For Pentium 4 and Core 2 there is one MSR which controls throttling - 0x19A. Command:
MSRED W 19A NN
Examples:
MSRED W 19A 18 - 50% CPU speed
MSRED W 19A 14 - 25% CPU speed
MSRED W 19A 12 - 12,5% CPU speed
MSRED W 19A 2 - 100% CPU speed

Filename
MSRED.zip
File size
719 Bytes
Downloads
296 downloads
File license
Fair use/fair dealing exception

CACHECTL.COM, works with Pentium Pro, Pentium 2, Pentium 3, Core 2. Doesn't work with all NetBurst CPUs!

Commands:
CACHECTL 0 - disable L2 and disable cache system totally with L1
CACHECTL 1 - enable cache system and L1, disable L2
CACHECTL 2 - enable cache system and L1, enable L2
CACHECTL c - check status

Filename
CACHECTL.zip
File size
704 Bytes
Downloads
254 downloads
File license
Fair use/fair dealing exception

Reply 3 of 22, by j^aws

User metadata
Rank Oldbie
Rank
Oldbie

Thanks for the thread.

I'm under the impression that the Pentium 4 Prescott mobile can underclock to 6x multi (haven't checked), which is as low as the Core2, so would this MSRED tool work for it, too?

Reply 5 of 22, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++

Have you done some testing on a Core 2? I'm interested in any information you have on how the speed ranges this delivers map onto Speedsys, DOOM, or any benchmark you've tested with. I'd love to compare versatility with the S754 machine I just go my hands on.

All hail the Great Capacitor Brand Finder

Reply 7 of 22, by PARUS

User metadata
Rank Oldbie
Rank
Oldbie

When you're slowing down Core 2 to ~486-386 and lower speeds I recommend to use multiplier x8. It is because if we get full synchronization CPU tacts and BUS tacts we will not find a lot of issues like jumps and delays. I explain:
1) maximum CPU throttle 12,5% (1/8), multiplier 8 --- 8x1/8=1
2) CPU throttle 25% (1/4), multiplier 8 --- 8x1/4=2
3) CPU throttle 50% (1/2), multiplier 8 --- 8x1/2=4
I.e. we always have full integer ratio CPU/BUS and probability of issues (jumps, delays) is minimum.

When you're slowing down to Pentium1 or higher speeds you can choose any combinations.

One more: to slow down lower than Pentium1 speeds you should disable L2 or L2+L1 via cachectl.com and slow down BUS via throttle.exe with -C key. Usual value is throttle 4 -c (but of course you try it yourself for your config).

Reply 8 of 22, by gdjacobs

User metadata
Rank l33t++
Rank
l33t++
PARUS wrote:
gdjacobs, yes, I have. See one screenshot which is saved in www: http://i12.pixs.ru/storage/9/3/8/600125jpg_6940319_28677938.jpg […]
Show full quote

gdjacobs, yes, I have. See one screenshot which is saved in www:
600125jpg_6940319_28677938.jpg
Config: Itox G7S620-N i865G, Core2 X6800, FSB400.
Commands:
MSRED W 194 10628
MSRED W 19A 12

Nice. What's the jump between max multi/FSB with caches disabled and min multi/FSB with caches enabled? Can you manipulate L1 and L2 individually and does that provide intermediate tunings?

All hail the Great Capacitor Brand Finder

Reply 9 of 22, by PARUS

User metadata
Rank Oldbie
Rank
Oldbie

I forgot to say, MSRED and CACHECTL are working only with HIMEM without EMM386. In future it would be nice to recompile them to work with any memory managers.

The max multi/FSB with caches disabled is buggy variant. I didn't even try it. Min multi/FSB with caches enabled gives us about Pentium1 speed, I have shown this on screenshot.
Yes, sure, we can manipulate them individually: L1- L2-; L1+ L2-; L1+ L2+. Variant L1- L2+ is impossible. More precisely it's technically possible but L2 will be unavailable if L1 disabled because L1 is disabling always with all cache subsystem together.

Reply 10 of 22, by Falcosoft

User metadata
Rank Oldbie
Rank
Oldbie

Hi, just some observations:

PARUS wrote:

I forgot to say, MSRED and CACHECTL are working only with HIMEM without EMM386. In future it would be nice to recompile them to work with any memory managers.

1. No recompiling can help here. These utilities use WRMSR/MOV CR0,<REG> instructions that are privileged instructions under protected/V86 mode. Once EMM386 is loaded it switches the CPU to protected/V86 mode so no user mode programs can use privileged instructions anymore. The only solution is when the memory manager itself can handle privileged instructions of user programs. Such a memory manger is JEMM386.
From JEMM386 documentation:

5. Emulation of privileged Opcodes […]
Show full quote

5. Emulation of privileged Opcodes

To provide Expanded Memory an EMM Emulator like Jemm runs the cpu in
so-called v86-mode. This mode does not allow to run privileged opcodes.
Some of these opcodes which might be useful for application programs
are emulated by Jemm, however. These are:

- mov <special_reg>, <reg> ;special_reg = CRn, DRn, TRn
- mov <reg>, <special_reg> ;reg = eax, ebx, ecx, edx, esi, edi, ebp
- WBINVD
- INVD
- WRMSR
- RDMSR
- RDTSC

2. IA32_PERF_STATUS MSR (0x198) and IA32_PERF_CTL MSR (0x199) are not Core 2 specific registers. They are standard SpeedStep registers that are available on all Intel CPU that use SpeedStep. So in order to make them work you should enable SpeedStep in BIOS or by setting bit 16 in IA32_MISC_ENABLE MSR (0x1A0).
The FID (multiplier setting) seems to be model independent but the VID value (voltage) depends on the CPU type.

I have also written a speedstep setting utility for DOS earlier (source is included):
http://falcosoft.hu/dos_softwares.html#sstep
About my findings:
https://sourceforge.net/p/freedos/mailman/message/31894268/

Website, Facebook, Youtube
Falcosoft Soundfont Midi Player + Munt VSTi + BassMidi VSTi
VST Midi Driver Midi Mapper

Reply 11 of 22, by PARUS

User metadata
Rank Oldbie
Rank
Oldbie

Wow, thanks a lot! You gave very valuable and useful information. OK, 198h/199h are not Core 2 specific but they are not for BetBurst, only for Pentium M/Core families. I have recalled! I saw it here: https://wenku.baidu.com/view/919c9849e518964bcf847c86.html for Northwood it's MSR 0x2C and 0x2D. I tried to rewrite values these MSR on my two unlocked Northwood CPUs in pure DOS via MSRED but unsuccessfully 🙁.
When I'll be back home I'll try 0x1A0 on my unlocked P4 and then 0x2C/2D.

Reply 12 of 22, by agent_x007

User metadata
Rank Oldbie
Rank
Oldbie

So, how Nehalem fits into this ?
I did test my Core i7 980X with SetMUL (w/L1D option) :
file.php?id=39630&mode=view
and here is "default" score :
Sz7d780l.jpg
Interesting part is that 4,3GHz i7 can be between 386dx and 486dx2... or is it an error ?

157143230295.png

Reply 14 of 22, by ruthan

User metadata
Rank Oldbie
Rank
Oldbie

I read the thread, im missing documentation for THrottle command, need its other utility? This line:
THROTTLE 4 -C

What if anything make sense to test with X58 platform CPU?

Interesting part is that 4,3GHz i7 can be between 386dx and 486dx2... or is it an error ?

Test it with this and we will see, if it would be much slower
PATH_BENCH - DOS path tracing CPU benchmark
Or you can try Phils DosBench utils package.

Im old goal oriented goatman, i care about facts and freedom, not about egos+prejudices. Hoarding=sickness. If you want respect, gain it by your behavior. I hate stupid SW limits, SW=virtual world, everything should be possible if you have enough raw HW.

Reply 15 of 22, by PARUS

User metadata
Rank Oldbie
Rank
Oldbie
ruthan wrote:
I read the thread, im missing documentation for THrottle command, need its other utility? This line: THROTTLE 4 -C […]
Show full quote

I read the thread, im missing documentation for THrottle command, need its other utility? This line:
THROTTLE 4 -C

What if anything make sense to test with X58 platform CPU?

Interesting part is that 4,3GHz i7 can be between 386dx and 486dx2... or is it an error ?

Test it with this and we will see, if it would be much slower
PATH_BENCH - DOS path tracing CPU benchmark
Or you can try Phils DosBench utils package.

I see you know now almost nothing about system throttling and too fast systems problem in DOS. It is very hard problem, too much harder than you can imagine with your most optimistic.

I said this not by chance:

PARUS wrote:

So I think the king is i865+ISA yet! With Core2 CPU this system is working fine on DOS-Win9X-WinXP/7/8.1, can get XT performance without issues, 286-386-486 performance without issues and so on Pentium-Pentium2 ----- Core 2 3GHz.

And about throttle issues on newer chipsets.

Reply 17 of 22, by ruthan

User metadata
Rank Oldbie
Rank
Oldbie

I see you know now almost nothing about system throttling and too fast systems problem in DOS. It is very hard problem, too much harder than you can imagine with your most optimistic.

Yeah its right, i have used slowdown some utility 15+ years ago - i dont even remember name, i dont needed it too often and Dosbox had in-build speed control.
I dont know if set of games which i have playing is typical, i had some speed problem with 3 games from 50, which i have tried.

I tested, Cachectl on X58 i got reboot. MSRED - i dont understand voltage control etc - so i dont tried it yet, SetMul is only working thing, it works for L1 cache, not for L2 cache.

Details are in my new compatibility thread:
X58/i865/V880 - Yamaha7x4/AurealV1/2 pure Dos7.1- compatibility list/research/ultim. drivers configs, WIP- gurus needed

Im old goal oriented goatman, i care about facts and freedom, not about egos+prejudices. Hoarding=sickness. If you want respect, gain it by your behavior. I hate stupid SW limits, SW=virtual world, everything should be possible if you have enough raw HW.

Reply 18 of 22, by PARUS

User metadata
Rank Oldbie
Rank
Oldbie

Of course proper CACHECTL work is guaranteed only for 80686 (Pentium Pro, 2, 3) and Core2 family. I have wrote about it already in first topic message. With <1366> and similar CPUs this program is not tested, is not debugged.

Reply 19 of 22, by ruthan

User metadata
Rank Oldbie
Rank
Oldbie
PARUS wrote:

Of course proper CACHECTL work is guaranteed only for 80686 (Pentium Pro, 2, 3) and Core2 family. I have wrote about it already in first topic message. With <1366> and similar CPUs this program is not tested, is not debugged.

Yeah, but it still was worth of try, SetMul was also developed for VIA and K6 mobile, but its working.

Im old goal oriented goatman, i care about facts and freedom, not about egos+prejudices. Hoarding=sickness. If you want respect, gain it by your behavior. I hate stupid SW limits, SW=virtual world, everything should be possible if you have enough raw HW.