Suggestion on CPU for a new Pc - page 2

 
I've never had that problem in particular, but I understand what you mean. Oh yes, however, more than anything else depends on the indicators that you use how heavy they are. However Marco, we are off topic, I mean I asked a simple question, why complicate things...
 
Zirok:
Hi everyone, I wanted to build a new pc for real-time trading but I'm really undecided on which cpu to take for my use. I premise that the idea would also be to keep the PC for 7/8 years and the main use at the time I would do would be to run 10/12 MT4 (no backtesting,10 to 50 open real time charts more or less(for every mt4), and there could be a use of some heavy indicators) + 2/3 virtual machine (Android emulator and testing some software) + Chrome with about 40 open cards + some lesser softwares. My idea was oriented towards an 8700k or 2700x and maybe a 9700k, but really I'm very undecided, what do you recommend? Also I wanted to ask you 32GB of Ram would be fine?

Hi,

It sounds like you plan to run this out of your own location so I am assuming that micro/milli-second latency is not a requirement for your strategy, i.e. you aren't planning to run on Broker co-resident VPS/servers. I am also assuming that you aren't going to be looking at all this simultaneously, so have not discussed video performance/selection. And I will also leave the whole issue of specific Broker tick reliability/latency/etc aside.

So, as each MT4 itself runs on a single thread it is critical that you analyze YOUR SPECIFIC CPU and memory requirements of each of these MT4s with the full number of indicators and charts loaded and running in busiest (highest tick) period of day, as CPU/memory performance will be the main bottlenecks for each MT4 instance. And this will be totally dependent on what programs you are using on each MT4 instance.

Using Windows Task Manager, look at the CPU consumption and the Commit Size as you open each subsequent chart. As open each new chart (with all indicators/Ea attached), if the memory gets over about 1,200,000 K this will be about the safe limit (experimentally determined) on number of charts each MT4 instance can handle. And will need at least this amount of memory for each MT4 instance. If you go beyond this limit your will be plagued with "MetaTrader is not Responding" CRASHING issues as Marco vd H has mentioned. The lower this is the better, since it is not really clear as to what the real MT4 memory limit is.

In terms of CPU consumption this needs to be analyzed at the busiest time of your trading day (e.g. at time with most ticks per minute). And since MT4 is single processor, a CPU with highest single thread performance is very important (e.g. https://www.cpubenchmark.net/singleThread.html). Next you have to analyze each of the indicators/EAs etc to see how they perform to see if all those you have loaded on a single chart run too slowly. This is analyzed initially with Task Manager to give a rough idea which programs are needing attention (i.e. look at CPU load for each indicator/EA individually). By too slow, assuming you are running each MT4 instance on a separate core, I would say anything over about 20-30% (to be safe) is too high (i.e. all charts running at highest tick rate with all indi's/Ea attached).  However in general you should carefully analyze each and every one of your programs using MetaEditor Profiling (or similar). You may be surprised by how much time is "wasted" doing things that are fully redundant or add no/very little value to your trading strategy, for example processing each and every single tick for indicators, recalculating results for the same thing over and over again needlessly, iCustom() overhead,  etc. If you are having performance issues, code/settings will need optimization, however since you are trying to build a pretty large system, it is likely that each and every thing you are running WILL need to be analyzed and optimized. If you are doing things like changing timeframes or symbols of the charts regularly (i.e. functions that cause Init function to be called) , the performance of this will also need to be analyzed carefully and optimized.


So in terms of total CPU memory, you will need enough to handle your full system (# of MT4 instances * memory required per MT4) as described above. Given 12 MT4s * 1.2G, 16G should be enough but 32G wouldn't hurt.

In terms of single thread performance, get one that has as high a rating as you can afford (in today's Intel processors something above 2300 rating is likely good enough).

In terms of disk performance definitely go for an SSD with NVMe/PCIe AND an SSD that IS known to be fast (e.g. 970 EVO, WD Black)

In terms of number of cores, this ideally is greater than the number of MT4 instances you intend to run. So if you really do need to run 10/12 MT4 instances, and you want to assign an MT4 to separate cores,  this is going to limit your choices to the latest and most expensive CPUs, eg. i7-8700k, i9-9900k. I am not very familiar with AMDs so not really sure about the REAL single core performance of them but they do have LOTS of cores :). You could also run multiple MT4s per core, but the CPU % limit discussed above would likely need to be reduced even further to ensure stability at peak tick rates (e.g. news event etc). Going this latter way opens up a lot of very good and more cost effective CPU choices.


Anyways hope this helps,

Al

PassMark CPU Benchmarks - Single Thread Performance
  • www.cpubenchmark.net
This chart comparing the single thread performance of CPUs is made using thousands of PerformanceTest benchmark results and is updated daily. This chart compares Desktop CPUs, from high...
 
Zirok:
unfortunately I do not have much money, look for something more moderate, your advice is very professional, but out of my reach and too excessive for my use, however, thanks for the advice

I think you missed the point on this one. A decent rig will cost you thousands but a VPS will only cost a little in comparison (most brokers will give you a free VPS if you trade enough). A VPS that is collocated in the same hosting center as the broker server will typically have ~1ms ping and 99.8%+ up-time. You won't have that kind of reliability from your home PC on your home network, and no amount of processing power can make up for the latency you will experience from your home network. The point being, the cheapest collocated VPS will always out-perform the most expensive rig on your home-network due to latency.

 
albry:

Hi,

It sounds like you plan to run this out of your own location so I am assuming that micro/milli-second latency is not a requirement for your strategy, i.e. you aren't planning to run on Broker co-resident VPS/servers. I am also assuming that you aren't going to be looking at all this simultaneously, so have not discussed video performance/selection. And I will also leave the whole issue of specific Broker tick reliability/latency/etc aside.

So, as each MT4 itself runs on a single thread it is critical that you analyze YOUR SPECIFIC CPU and memory requirements of each of these MT4s with the full number of indicators and charts loaded and running in busiest (highest tick) period of day, as CPU/memory performance will be the main bottlenecks for each MT4 instance. And this will be totally dependent on what programs you are using on each MT4 instance.

Using Windows Task Manager, look at the CPU consumption and the Commit Size as you open each subsequent chart. As open each new chart (with all indicators/Ea attached), if the memory gets over about 1,200,000 K this will be about the safe limit (experimentally determined) on number of charts each MT4 instance can handle. And will need at least this amount of memory for each MT4 instance. If you go beyond this limit your will be plagued with "MetaTrader is not Responding" CRASHING issues as Marco vd H has mentioned. The lower this is the better, since it is not really clear as to what the real MT4 memory limit is.

In terms of CPU consumption this needs to be analyzed at the busiest time of your trading day (e.g. at time with most ticks per minute). And since MT4 is single processor, a CPU with highest single thread performance is very important (e.g. https://www.cpubenchmark.net/singleThread.html). Next you have to analyze each of the indicators/EAs etc to see how they perform to see if all those you have loaded on a single chart run too slowly. This is analyzed initially with Task Manager to give a rough idea which programs are needing attention (i.e. look at CPU load for each indicator/EA individually). By too slow, assuming you are running each MT4 instance on a separate core, I would say anything over about 20-30% (to be safe) is too high (i.e. all charts running at highest tick rate with all indi's/Ea attached).  However in general you should carefully analyze each and every one of your programs using MetaEditor Profiling (or similar). You may be surprised by how much time is "wasted" doing things that are fully redundant or add no/very little value to your trading strategy, for example processing each and every single tick for indicators, recalculating results for the same thing over and over again needlessly, iCustom() overhead,  etc. If you are having performance issues, code/settings will need optimization, however since you are trying to build a pretty large system, it is likely that each and every thing you are running WILL need to be analyzed and optimized. If you are doing things like changing timeframes or symbols of the charts regularly (i.e. functions that cause Init function to be called) , the performance of this will also need to be analyzed carefully and optimized.


So in terms of total CPU memory, you will need enough to handle your full system (# of MT4 instances * memory required per MT4) as described above. Given 12 MT4s * 1.2G, 16G should be enough but 32G wouldn't hurt.

In terms of single thread performance, get one that has as high a rating as you can afford (in today's Intel processors something above 2300 rating is likely good enough).

In terms of disk performance definitely go for an SSD with NVMe/PCIe AND an SSD that IS known to be fast (e.g. 970 EVO, WD Black)

In terms of number of cores, this ideally is greater than the number of MT4 instances you intend to run. So if you really do need to run 10/12 MT4 instances, and you want to assign an MT4 to separate cores,  this is going to limit your choices to the latest and most expensive CPUs, eg. i7-8700k, i9-9900k. I am not very familiar with AMDs so not really sure about the REAL single core performance of them but they do have LOTS of cores :). You could also run multiple MT4s per core, but the CPU % limit discussed above would likely need to be reduced even further to ensure stability at peak tick rates (e.g. news event etc). Going this latter way opens up a lot of very good and more cost effective CPU choices.


Anyways hope this helps,

Al

Dear albry,

I think you are very knowlegable on PC, I use intel 9700K with 22 instance MT4 which did not perform compared with intel 7700, usually 9700K did not react.

Intel 9700K show a higher single thread power, but why it did not good?

Off course I compare the same situation between 9700k and 7700.

Tetatively, I set affinity setting for 9700K but the situation was not improved.

Thanks.

 
kasugayama:

Dear albry,

I think you are very knowlegable on PC, I use intel 9700K with 22 instance MT4 which did not perform compared with intel 7700, usually 9700K did not react.

Intel 9700K show a higher single thread power, but why it did not good?

Off course I compare the same situation between 9700k and 7700.

Tetatively, I set affinity setting for 9700K but the situation was not improved.

Thanks.

Hi,


Yes I experience the same issue when running multiple MT4 instances. It likely has do to each MT4 instance requiring that it receives and handles all of the tick data.

This means that each instance will each require this data to be loaded from the Broker server, which can add huge latency, particularly for 22 instances all requesting this across your common network connection, and also depends highly on the Broker's server performance for this.

You could reduce this considerably by reducing the number of pairs in market watch window to just the ones you are trading, but still you will have the 22 instances multiplier.

I eventually gave up on the multiple MT4 instances and optimized each individual chart window within a single MT4 instance so as to perform well for my strategy.

In this way all charts are sharing the tick data for a single MT4 instance, and are all optimized to only process what tick data they actually need rather than processing every tick, e.g. , process only on new bars, not running GUI functions if not chart on top etc. etc.

If you truly need multiple instances, you should consider VPN solutions as they will allow you to "engineer" the VPNs (possibly at an additional cost)  so that they perform well for each MT4 instance and have greatly reduced latency on loading the tick data (but still depend on getting it for all VPN instances).

Then you will also need to analyze the perform bottlenecks of the VPN service for each MT4 instance as there will likely be some "issues" that will need to be dealt with so that all charts run smoothly.Likely the knobs needed for PC optimization are needed for VPN (other than the GUI)

I personally have not set up VPNs as I do not need low latency at this time, but have been considering it for other reasons (remote access, Broker connectivity, etc) as well as a significant remaining bottleneck of the single MT4 instance:the single thread ~1.2G limit.


Hope this helps further...

 
albry:

Hi,

It sounds like you plan to run this out of your own location so I am assuming that micro/milli-second latency is not a requirement for your strategy, i.e. you aren't planning to run on Broker co-resident VPS/servers. I am also assuming that you aren't going to be looking at all this simultaneously, so have not discussed video performance/selection. And I will also leave the whole issue of specific Broker tick reliability/latency/etc aside.

So, as each MT4 itself runs on a single thread it is critical that you analyze YOUR SPECIFIC CPU and memory requirements of each of these MT4s with the full number of indicators and charts loaded and running in busiest (highest tick) period of day, as CPU/memory performance will be the main bottlenecks for each MT4 instance. And this will be totally dependent on what programs you are using on each MT4 instance.

Using Windows Task Manager, look at the CPU consumption and the Commit Size as you open each subsequent chart. As open each new chart (with all indicators/Ea attached), if the memory gets over about 1,200,000 K this will be about the safe limit (experimentally determined) on number of charts each MT4 instance can handle. And will need at least this amount of memory for each MT4 instance. If you go beyond this limit your will be plagued with "MetaTrader is not Responding" CRASHING issues as Marco vd H has mentioned. The lower this is the better, since it is not really clear as to what the real MT4 memory limit is.

In terms of CPU consumption this needs to be analyzed at the busiest time of your trading day (e.g. at time with most ticks per minute). And since MT4 is single processor, a CPU with highest single thread performance is very important (e.g. https://www.cpubenchmark.net/singleThread.html). Next you have to analyze each of the indicators/EAs etc to see how they perform to see if all those you have loaded on a single chart run too slowly. This is analyzed initially with Task Manager to give a rough idea which programs are needing attention (i.e. look at CPU load for each indicator/EA individually). By too slow, assuming you are running each MT4 instance on a separate core, I would say anything over about 20-30% (to be safe) is too high (i.e. all charts running at highest tick rate with all indi's/Ea attached).  However in general you should carefully analyze each and every one of your programs using MetaEditor Profiling (or similar). You may be surprised by how much time is "wasted" doing things that are fully redundant or add no/very little value to your trading strategy, for example processing each and every single tick for indicators, recalculating results for the same thing over and over again needlessly, iCustom() overhead,  etc. If you are having performance issues, code/settings will need optimization, however since you are trying to build a pretty large system, it is likely that each and every thing you are running WILL need to be analyzed and optimized. If you are doing things like changing timeframes or symbols of the charts regularly (i.e. functions that cause Init function to be called) , the performance of this will also need to be analyzed carefully and optimized.


So in terms of total CPU memory, you will need enough to handle your full system (# of MT4 instances * memory required per MT4) as described above. Given 12 MT4s * 1.2G, 16G should be enough but 32G wouldn't hurt.

In terms of single thread performance, get one that has as high a rating as you can afford (in today's Intel processors something above 2300 rating is likely good enough).

In terms of disk performance definitely go for an SSD with NVMe/PCIe AND an SSD that IS known to be fast (e.g. 970 EVO, WD Black)

In terms of number of cores, this ideally is greater than the number of MT4 instances you intend to run. So if you really do need to run 10/12 MT4 instances, and you want to assign an MT4 to separate cores,  this is going to limit your choices to the latest and most expensive CPUs, eg. i7-8700k, i9-9900k. I am not very familiar with AMDs so not really sure about the REAL single core performance of them but they do have LOTS of cores :). You could also run multiple MT4s per core, but the CPU % limit discussed above would likely need to be reduced even further to ensure stability at peak tick rates (e.g. news event etc). Going this latter way opens up a lot of very good and more cost effective CPU choices.


Anyways hope this helps,

Al



Thanks very much for the very detailed explanation albry, maybe some are complicated to put in place for me, but there are many details from which I can take cues.
 
nicholi shen:

I think you missed the point on this one. A decent rig will cost you thousands but a VPS will only cost a little in comparison (most brokers will give you a free VPS if you trade enough). A VPS that is collocated in the same hosting center as the broker server will typically have ~1ms ping and 99.8%+ up-time. You won't have that kind of reliability from your home PC on your home network, and no amount of processing power can make up for the latency you will experience from your home network. The point being, the cheapest collocated VPS will always out-perform the most expensive rig on your home-network due to latency.

I really have no knowledge on vps for mt4, maybe it could be a good idea, but I just do not know. It seems a little out of my reach for now, but thanks for the suggestion.

 

A further update on this. I spent some more time testing out my configuration on the latest MT4 build (1170), and I have to say that the situation seems MUCH BETTER now than when I previously did testing (many months ago on a prior build).


It is now possible to load up many more charts, and go WELL ABOVE the 1.2G limit I had previously experienced. Was able to load 28 charts with large amount of GUI on each chart and consumed memory up to about 3.5G while using less than 30% of a single core in Sunday evening market tick rate. As I tried to load additional indicators to a chart I received warnings about "not enough memory for EX4 file", but it DID NOT crash !!! Left this running for 12 hours scrolling from one chart to next every few seconds and next morning all was still running with no additional memory consumption and everything seeming to be working fine.


The overall performance of the system at this level was not great from my perspective, but at least it didn't crash. For example response to clicking a button to change to another chart was in the order of seconds, where when only a couple of charts are open it is in order of 100's of milliseconds (not too scientific :)

I did notice one serious  issue though, when I removed all the charts the MT4 terminal was still holding onto large amount of memory. E.g. when all 28 charts were deleted it was still holding onto 2G of memory. The only way I was able to free this up was to fully shut down the MT4 terminal and restart it. So it would seem that shutting down MT4  regularly is required to free up leaked memory. Same is true when dynamically opening and then closing charts with GUI, a large chunk of memory was not released when the chart was closed. When the indicators are added and then deleted from the chart the memory seems to be freed up properly, so don't think it is an indicator/EA coding issue.

It seems this issue might have to do with MT4 OBJ_BUTTON memory allocation/de-allocation, since these charts create a lot of these. And these buttons also seem to be quite heavy memory consumers, chart with 6 indicators (limited to 2000 bars) with about 100 buttons consumes about 100MB.

Another issue I noticed is that the TerminalInfoInteger(TERMINAL_MEMORY_USED) doesn't seem to give the same values as Windows Task Manager. For example I have a single chart open the windows says has a working Set/Commit SIze of 103M/83M where TERMINAL_MEMORY_USED says 635M. 

Reason: