Bug report: Error when running multiple MT5 terminals - page 3

 
Fernando Carreiro #:

That is for setting only CPU priority, at the local scope. Windows Servers have several other settings that are at play which are by default optimised for use as a "Server" and not as a "Workstation".

Windows for a workstation and Windows for a server, are setup and optimised completely differently. The workstation is optimised for use by a single user sitting in front of it and running GUI applications, while the server is optimised for running multiple headless services in a highly intensive network environment.

In order to optimise the Windows Server to work more like a workstation, many settings have to be adjusted.

Thanks for the explanation, I didn't know that. It would be great to have a tutorial that explains how to make the settings on a windows server to switch it to "workstation" use. I tried the modification of the register described in another message but that does not really improve (from 11 MT5 the dedicated server becomes slow)
 
Nicolas Gilles Capot Klein #:
Thanks for the explanation, I didn't know that. It would be great to have a tutorial that explains how to make the settings on a windows server to switch it to "workstation" use. I tried the modification of the register described in another message but that does not really improve (from 11 MT5 the dedicated server becomes slow)

I am very sceptical about the answers you have been given. The OP's post mentioned problems with the whole of Windows, not just MT5, and fxsaber posted a very insightful link to an issue with the Windows O/S in general, not specifically related to Windows Server vs Workstation. If you are truly having the same issue as the OP, with problems affecting the whole of Windows, rather than just the instances of MT5 itself, then that cause and its resolution are almost certainly the answer.

What fxsaber's link is saying is that there is an age-old limitation on the number of graphics handles in the Windows operating system (again, any version, not just Server). What the link doesn't add is that the issue particularly affects MT5 because MT5 uses lots of very antique Win32 graphics functions. Ever wondered why a line on an MT5 chart which is more than 1 pixel wide can only be solid, not dotted or dashed? Because it's a limitation of the Win32 CreatePen() function, carried over from the very earliest versions of Windows >20 years ago.

While I know that there are many things that I don't know, I am not aware of any relevant settings difference between Server and Workstation other than the default value of Control Panel > Advanced system settings > Advanced > Processor scheduling. The default is "Programs" for Workstation and "Background services" for Server. You can change that, but I would be amazed if you see any improvement in your problem, because it's pretty clearly not a scheduling issue. I'm not aware of any other settings which affect the performance of Server vs Workstation.

 
kdufgh #:

I am very sceptical about the answers you have been given. The OP's post mentioned problems with the whole of Windows, not just MT5, and fxsaber posted a very insightful link to an issue with the Windows O/S in general, not specifically related to Windows Server vs Workstation. If you are truly having the same issue as the OP, with problems affecting the whole of Windows, rather than just the instances of MT5 itself, then that cause and its resolution are almost certainly the answer.

What fxsaber's link is saying is that there is an age-old limitation on the number of graphics handles in the Windows operating system (again, any version, not just Server). What the link doesn't add is that the issue particularly affects MT5 because MT5 uses lots of very antique Win32 graphics functions. Ever wondered why a line on an MT5 chart which is more than 1 pixel wide can only be solid, not dotted or dashed? Because it's a limitation of the Win32 CreatePen() function, carried over from the very earliest versions of Windows >20 years ago.

While I know that there are many things that I don't know, I am not aware of any relevant settings difference between Server and Workstation other than the default value of Control Panel > Advanced system settings > Advanced > Processor scheduling. The default is "Programs" for Workstation and "Background services" for Server. You can change that, but I would be amazed if you see any improvement in your problem, because it's pretty clearly not a scheduling issue. I'm not aware of any other settings which affect the performance of Server vs Workstation.

Why sceptical ? This is not in opposition but in complement.

The trick with the registry needs to be tested, but I just checked on a Window Server 2012R2 and a Windows Server 2019, as well as Windows 10 and they all have the same default settings 1024,20480,768.

So yes it can certainly help, but this registry tweak was provided as a solution to someone with :

Windows Server 2019, 2 cores, 8 GB, 40 GB, and 2nd - Windows Server 2016, 2 cores, 4 GB, 30 GB. As a result, I cannot run more than 27 MT5 instances on the 1st one, and no more than 21 MT5 instances on the 2nd one.

Here it's 11 only. And it seems all people reporting this issue are using a Windows Server OS and/or a VM, so it must also be something related to it. Or not, but it's a valid hypothesis.

But for sure, the OP should try the registry tweak at the first place.

 
Alain Verleyen #:

Why sceptical ? This is not in opposition but in complement.

Why sceptical? Two reasons. Firstly, I have never heard of all these many settings differences between Server and Workstation which supposedly exist, and no one's saying what they actually are. Whereas, secondly, fxsaber posted a link to concrete known issue, confirmed by the MetaQuotes CEO.
 
kdufgh #:
Why sceptical? Two reasons. Firstly, I have never heard of all these many settings differences between Server and Workstation which supposedly exist, and no one's saying what they actually are. Whereas, secondly, fxsaber posted a link to concrete known issue, confirmed by the MetaQuotes CEO.
... The key question, as I've said, is whether, like the OP, the additional poster has issues with the whole of Windows rather than just MT5. If yes, then it's almost certainly the same or similar limitation in the Windows codebase as a whole, not specific to Server or Workstation. But if no, then it will be something completely different.
 
kdufgh #: Why sceptical? Two reasons. Firstly, I have never heard of all these many settings differences between Server and Workstation which supposedly exist, and no one's saying what they actually are. Whereas, secondly, fxsaber posted a link to concrete known issue, confirmed by the MetaQuotes CEO.

I worked for Microsoft (for a year) in South Africa, back when Window NT first came out (in early 90's), and I have followed by working with our companies as a MSDN developer and Windows server administrator for many years after that (up to 2018).

If you are sceptical of my experience or knowledge, then I recommend you do some deep-dive research on the subject or maybe consider doing one of Microsoft's Certified Administrator courses.

 
kdufgh #:
... The key question, as I've said, is whether, like the OP, the additional poster has issues with the whole of Windows rather than just MT5. If yes, then it's almost certainly the same or similar limitation in the Windows codebase as a whole, not specific to Server or Workstation. But if no, then it will be something completely different.
... I also wonder if that issue has been at least partially addressed in the 6 months since fxsaber's link. While I haven't tried running more than a few MT5 terminals, the GDI usage looks high for a contemporary application because of the long-term legacies in the MT5 codebase, but not nearly high enough to be likely to trigger a problem. It all comes down to whether, like for the OP, the impact is wider than just on MT5.
 
Fernando Carreiro #:

I worked for Microsoft (for a year) in South Africa, back when Window NT first came out (in early 90's), and I have followed by working with our companies as a MSDN developer and Windows server administrator for many years after that (up to 2018).

If you are sceptical of my experience or knowledge, then I recommend you do some deep-dive research on the subject or maybe consider doing one of Microsoft's Certified Administrator courses.

I have much the same experience as you, but - my apologies - I seem to have forgotten all the settings which you clearly know of but haven't yet told us. Please remind me.

(You can tell that, like you, I was knocking around with Windows in the early 90s because, as your doubtless remember yourself, the CreatePen() limitation which manifests even in MT5 in 2023 was already old news back then.)

 
kdufgh #: I have much the same experience as you, but - my apologies - I seem to have forgotten all the settings which you clearly know of but haven't yet told us. Please remind me.

Sorry, but the world does not work that way. I have no need to prove myself, so trying to bait me into giving out free information which I have built up over many years, is not going to work.

 
Fernando Carreiro #:

Sorry, but the world does not work that way. I have no need to prove myself, so trying to bait me into giving out information which I have built up over many years, for free, is not going to work, nor do I need the money either.

I'm not sure what the point of this forum is if you're going to tease the new poster by telling him that there are settings which he can change, but then refuse to tell him what they are. I'm not trying to "bait" you into giving out information. I don't understand why you'd join the discussion in the first place if you have useful information but aren't prepared to share it.
Reason: