Windows Server and MT4 - best settings for stability

 

Hello,

I have an EA for MT4 which causes occasionally my CPU to jump to 100% and to make MT4 unresponsive which stops all trading.

Let's not discuss if the EA is poorly written or not, since I do not have access to the code.

There is something else that bothers me. I am running this EA on 3 different VPS providers with the following configuration:

1. 1 CPU (Intel) and 2 GB RAM.

2. The same as above.

3. 3 CPU (AMD) and 4 GB RAM.

All of the VPS's are running on Windows Server 2012.

It's interesting that on server 1. the EA is causing problems 1-2 times per week. On the 2. - 1-2 times per month and on the third configuration - 3-4 times per day.

So, what am I missing and how with the same MT4 settings everywhere there are so huge discrepancies? And most importantly - why on the most powerful server, the problems are more often than on the others?

Hope someone will help with some insights.

Regards! 

 

You ask for advice, by most importantly, you have not explained what "problems" you are having. Without that information we can't say what is causing it.

Please describe them in detail, supply log output from the Expert and Journal logs, and supply some screenshots if necessary.

That aside, you also ask not to discuss the EA in question, but unfortunately, that may end up being the primary cause of whatever problems you are having, and without source code, we have no ideia how it works or would issues it could be causing.

 
Fernando Carreiro #:

You ask for advice, by most importantly, you have not explained what "problems" you are having. Without that information we can't say what is causing it.

Please describe them in detail, supply log output from the Expert and Journal logs, and supply some screenshots if necessary.

That aside, you also ask not to discuss the EA in question, but unfortunately, that may end up being the primary cause of whatever problems you are having, and without source code, we have no ideia how it works or would issues it could be causing.


Thanks for the reply Fernando.

There is nothing unusual in the logs. I have examined them carefully. Also, as I said, it is an ex4 file, so I do not have access to the source code.

The problem is that the CPU usage jumps to 100% occasionally which causes MT4 to stop working and become Not Responding.

So my question is why on 1 of the VPS's this happens 1-2 times per month and on the other for example (which is more powerful) this happens a couple of times per day.

Could this be some configuration in Windows Server? Or because of the different ping? Or because the CPU architecture (1 is Intel, the other AMD)?

 
kanadeca #Thanks for the reply Fernando. There is nothing unusual in the logs. I have examined them carefully. Also, as I said, it is an ex4 file, so I do not have access to the source code. The problem is that the CPU usage jumps to 100% occasionally which causes MT4 to stop working and become Not Responding. So my question is why on 1 of the VPS's this happens 1-2 times per month and on the other for example (which is more powerful) this happens a couple of times per day. Could this be some configuration in Windows Server? Or because of the different ping? Or because the CPU architecture (1 is Intel, the other AMD)?

99% of the time, the issue is caused by a badly coded EA, but since you state that nothing is reported in the Journal log or the Experts log, and given that you don't have the source code, not much can be done.

By the way, how many MT4 terminals are you running on each of those VPS machines?

And how many charts/EAs are running per terminal?

Does the EA depend on any Indicators (especially custom indicators)?

 
Fernando Carreiro #:

99% of the time, the issue is caused by a badly coded EA, but since you state that nothing is reported in the Journal log or the Experts log, and given that you don't have the source code, not much can be done.

By the way, how many MT4 terminals are you running on each of those VPS machines?

And how many charts/EAs are running per terminal?

Does the EA depend on any Indicators (especially custom indicators)?

Each VPS runs only 1 instance of MT4. Only 1 EA which runs on 1 chart and I have made all little tweaks for performance - disable news, sounds, max bars in history, etc.

The EA does not depend on indicators it gets signals from a totally different server and the EA on my chart only manages those signals based on money management strategy. It basically copies signals and manages SL, TP, etc.

What really bothers me is that I have paid 2 different "Forex VPS" companies and the same EA with the same settings and everything is crashing 1-2 times per week with the first company and 1-2 timers per month with the second.

In the meantime I have a dedicated server where I have made the virtualisation by myself. Basically I have split my server to VPS's where this particular EA is crashing a couple of times per day.

I am searching for some tweaks or settings, maybe in MT4 or Windows Server which will help to reduce the number of those crashes despite the EA and the way it's written.

 
kanadeca #: Each VPS runs only 1 instance of MT4. Only 1 EA which runs on 1 chart and I have made all little tweaks for performance - disable news, sounds, max bars in history, etc. The EA does not depend on indicators it gets signals from a totally different server and the EA on my chart only manages those signals based on money management strategy. It basically copies signals and manages SL, TP, etc. What really bothers me is that I have paid 2 different "Forex VPS" companies and the same EA with the same settings and everything is crashing 1-2 times per week with the first company and 1-2 timers per month with the second. In the meantime I have a dedicated server where I have made the virtualisation by myself. Basically I have split my server to VPS's where this particular EA is crashing a couple of times per day.I am searching for some tweaks or settings, maybe in MT4 or Windows Server which will help to reduce the number of those crashes despite the EA and the way it's written.

Given that you have taken precautions to make the environment as efficient as possible, then the only remaining factor is the EA itself.

Since, you say that the EA is getting its signals externally, then I can only guess the problem is with that very functionality. It may be going into an endless loop when there is a delay with those communications, thus causing the High CPU.

Unfortunately, without source code, we can only speculate.

 
Fernando Carreiro #:

Given that you have taken precautions to make the environment as efficient as possible, then the only remaining factor is the EA itself.

Since, you say that the EA is getting its signals externally, then I can only guess the problem is with that very functionality. It may be going into an endless loop when there is a delay with those communications, thus causing the High CPU.

Unfortunately, without source code, we can only speculate.

Sorry to hear that... Thank you for all the replies, Fernando!
 

In you are running a dedicated Windows Server there is a good chance the DHCP resources are maxed out (check: net start).

See which program(s) is (are) doing this.

If you determine it is solely caused by your EA then your only option is to acquire a less resource intense version and load that

on your server.  If this issue is caused by multiple programs (particularly silently running in the back) then your option is to

1) reconfigure your server so that these programs take up less resources,

2) disable all programs that silently operate in the back (backup software for example),

3) release memory back to the server as soon as you close a program.

 
Lode Loyens #: In you are running a dedicated Windows Server there is a good chance the DHCP resources are maxed out (check: net start). See which program(s) is (are) doing this. If you determine it is solely caused by your EA then your only option is to acquire a less resource intense version and load that on your server.  If this issue is caused by multiple programs (particularly silently running in the back) then your option is to 1) reconfigure your server so that these programs take up less resources, 2) disable all programs that silently operate in the back (backup software for example), 3) release memory back to the server as soon as you close a program.
No, the DHCP service is completely irrelevant here, and is in no way "maxing out".
 

I know you know but just in case:

Windows server is for networking.  Meaning multiple users can access data hosted on one (or more) dedicated computers (servers).

Are you the only one accessing the EA when it crashes the server?  Are other users accessing the server at the same time, even

for different software (accounting, word processing, etc.)?

If so, maybe the server's resources are overextended because of heavy volume?


PS>  When running the EA on a Windows based stand alone computer (not a server) does Windows crash as well?

PSS> Is the EA you use a networking version or a single user version?  Memory is allocated differently for multi-user software as

it incorporates load, save and modify functions that prevent other users from overwriting data entered or modified by someone else.

 
Lode Loyens #: I know you know but just in case: Windows server is for networking.  Meaning multiple users can access data hosted on one (or more) dedicated computers (servers). Are you the only one accessing the EA when it crashes the server?  Are other users accessing the server at the same time, even for different software (accounting, word processing, etc.)? If so, maybe the server's resources are overextended because of heavy volume? PS>  When running the EA on a Windows based stand alone computer (not a server) does Windows crash as well?

Did you not understand what "dedicated server" meant to the OP?

"Dedicated" meant that the OP is the ONLY one using it and for his trading. There are no other "multiple users", accessing other resources or applications.