Build 600+ and CPU usage - page 8

 
xaphod:

Build 628. No incoming ticks. >500 times/second. Wonderful!

Please check with build 645 (last official release), and report it to the ServiceDesk of Metaquotes, if unchanged. Thank you.
 
xaphod:

Build 628. No incoming ticks. >500 times/second. Wonderful!


So build 509 no such thing happen ? How bout 625 ?
 
mikeyap9:
Fixed and it was due to my code. I added variables that weren't initialized properly so I had calculations looping endlessly.


I spoke too soon that wasn't it. It was a actually file read contention, I have 28 bots reading the same setup file. All I did was switch to FILE_SHARE_READ instead of FILE_READ. Back to normal now.
 

I still have high CPU usage on a single terminal.  Using builds 745 and 765.  I tested the terminal with no charts loaded, news disabled, alerts disabled.  Still get 40-60% cpu usage.  dual core 3.1Ghz vps win2008, R2 64 bit. 1.5GB ram, 400-800MB ram free. About 7 terminals running.  some terminals that are loaded with charts are showing 1-3% cpu usage.  Why the high usage on random terminals, even with nothing running?

edit:  Here is a screenshot of Process Explorer's process properties page:

 

I try to kill the high usage thread.   When I do, another thread using the same cpu usage takes its place.

edit: then I try to 'suspend' the thread (not kill it).  

 

 

 

That lowers the cpu, but I need to see if it affects the terminal in any other way.  Previous posts have suggested that quotes have stopped coming to the terminal (when killed).  So when the market resumes on later today, I will have to see.  I tried to resume it now and the thread just jumps back to the high cpu usage.  No open charts, and the market watch has no symbols (hide all).  Plus the markets are closed, so no incoming ticks.

 edit:  the markets have reopened.  When I suspend the thread, the terminal will appear to work normally for 5-10 minutes, then it will suddenly freeze (not responding) and then you must either un-suspend (resume) the thread to get the program to work, or restart the program.

 I did notice that another terminal that I launched around the same time after the reboot also had high memory usage no longer has it (went back down to 0.2-1.5% cpu usage).  And this terminal has charts open with EAs and indicators.   There doesn't seem to be a rational reason here for unexplained high cpu usage, unless I am missing something.

 

I just tested on a brand new test server, this time using windows 2012 64 bit with 4 processors and 2gb ram.  I had terminals launched with low cpu usage (between 0.1 and 1%) even with several charts loaded and indicators.

 Then I launched a terminal freshly installed, and  about 2 minutes after launching, it goes to 25% usage (no open charts).  The other existing terminals are lower usage. 

 Then the other terminals that were behaving without incident.  When they are restarted, the immediately terminals go to using high cpu usage.   Hmmmm....

I think it is some bug in the mt4 that is making a thread use so much cpu.  But why? 

------- 

 edit:   By unblocking the mql4.codebase.en.dat file, the cpu usage resumed to 0.2-3%.  It no longer maxes out a processor per terminal and the file writes normally.

mql4.codebase.en.dat file located here:   Users\[user]\AppData\Roaming\MetaQuotes\Terminal\Community 

Previously, read-only permissions were assigned to certain mt4 files to reduce bloatware. 

Reason: