This forum is in read-only mode now. You may discuss your questions on forums of MQL4.community and MQL5.community

Laptop overheats and reboots after 5 hours because CPU runs at 100%


Back to topics list
avatar
129
Vooch 2005.07.15 10:57 
I've got a P850 laptop that I don't use much, and I'd like to run 100-hour MT4 optimizations on it.

The problem is that MT4 runs the CPU at 100% and after about 5 hours, the system overheats and reboots itself.

Does anyone know of a way to force MT4 to run at 50% CPU utilization? Is it possible?

avatar
120
hdb 2005.07.15 13:10 
u can reduce the clock speed on some PCs.. in the Bios..
avatar
129
Vooch 2005.07.15 20:24 
> u can reduce the clock speed on some PCs.. in the Bios.

Unfortunately, not on this one.

Also, I forgot to mention, I'm running Windows 2000 Server on it.
avatar
129
Vooch 2005.07.17 23:36 
My friend Mage suggested I import kernel32.dll and use the SleepEx() function, so we came up with this solution which reduces CPU utilization under 50%.

I don't know if this solution will fix my problem yet.

I just started running a 65,000 combination optimization using a P850 laptop and it has 690 hours to go. If I can get past 8 or 24 hours, I'll assume it works and then seek to increase the CPU utilization a little more by testing every few minutes & seconds, instead of just once a minute.

////////////////////////////////////////////////////////////////
// REDUCE CPU UTILIZATION - Part 1 of 2
// Be sure to turn ON 'allow import dlls', using "Tools" "Options" on the menu
#import "kernel32.dll"
     int SleepEx(int wait, int io);
////////////////////////////////////////////////////////////////


int start()
{


////////////////////////////////////////////////////////////////
// REDUCE CPU UTILIZATION - Part 2 of 2
if(Seconds()==30) { SleepEx(1,0); }
////////////////////////////////////////////////////////////////



The code above shows the relative position of where it should be placed (ie. just before and after the start() function).

- Vooch

P.S. Be sure to turn ON 'allow import dlls', using "Tools" "Options" on the menu

avatar
240
MartinCooney 2005.07.18 03:53 
Holy Dooly !!!!
You running an optimisation that's going to take a month to complete ?? :) I sure hope you don't get a power glitch/failure during that time.

Martin
avatar
129
Vooch 2005.07.18 16:22 
UPDATE: The laptop survived last night. It's been running an MT4 optimization over 17 hours now without a reboot.

Thanks Mage!!!

- Vooch
avatar
120
hdb 2005.07.18 17:34 
well done!!
avatar
8
Mage 2005.07.18 22:03 
Good to see that it did work.

For anyone that is wondering the reason to use the SleepEx function and not the Sleep function is only because Sleep is already a function in MT. However when back testing MT seems to ignore it.
Back to topics list  
Download MetaTrader 5 (450 Kb, web installer) — a new terminal for financial markets