Compilation of MQL5 programmes with AVX / AVX2 + FMA3 / AVX512 + FMA3 instruction set from build 3902

 

In the next beta we have released the ability to compile MQL5 programmes using the extended set of instructions AVX / AVX2 + FMA3 / AVX512 + FMA3.

They allow you to generate more efficient and faster code.

You can configure both general settings for single programmes and personal settings for projects:




Please join the testing by downloading the beta version from the MetaQuotes-Demo server or update via the "Help" menu section.

 

Can I get some explanations/comments from developers on MT5 operation on processors with "energy efficient" cores?

People are usually interested in tester work, but I'm more interested in just MT5 work with a lot of running EAs (and "multi EAs" - many independent ones in one).

 

Forum on trading, automated trading systems and testing trading strategies

Processor for MT4/MT5

Stanislav Korotky, 2023.08.26 21:09

All this is guessing at coffee grounds. MQ should provide its own benchmark (a programme like PCMark, CineBench, Geekbench, etc.) - like MetaTraderBench. Questions about CPU/GPU performance, graphics, disc handling, etc. in application tasks would be eliminated. It would be easier to choose a PC configuration for MT.

There is no Bench, unfortunately.

 
MetaQuotes:

allow you to generate more efficient and faster code.

What are your recommendations for choosing the best settings for local machine and for remote machine (for Market, Agents, etc.)?
 
JRandomTrader #:

Can we get some clarification/comments from the developers on running MT5 on processors with "power efficient" cores?

People are usually interested in tester work, but I'm more interested in just MT5 work with a lot of running EAs (and "multi EAs" - many independent ones in one).

Our tests have shown:

  1. Switching from MSVC compiler to Clang/LLVM gives an overall increase of up to 25% - just such a monstrous growth, Google about Chrome builds similarly stated

    That's why MetaTrader 5 has been built on Clang for a long time.

  2. Using AVX in the platform gives a serious increase, without specifying percentages

    That's why we have two sets of client terminals: the outdated NoAVX version on MSVC for old processors and AVX on Clang for modern ones.

    Installer automatically determines which version to put. Livapdate too.

  3. Our latest research shows that AVX2 + FMA3 gives an improvement over AVX

    FMA3 helps in vector maths, which should work well for our class of problems.

    We will soon release the third set of programs with AVX2. At the next update the terminal itself will transparently select the new version.


Working with P/E kernels depends entirely on Windows Scheduler and even Intel Thread Director (Thread Manager extension) is not fully efficient in assigning tasks by importance. There are various borderline cases out there where the dispatcher is ineffective or questionable.

Trying to use affinity mask in the general case only makes things worse. Especially when the application is running on a virtual machine.

You may nail affinity mask only in special cases of strict optimisation of a particular application.



General recommendations on processors are simple: more cores, higher frequency, more L1/L2 caches, enough high-speed RAM and NVME discs.

Now consumer processors have confidently taken the threshold of 5 gigahertz . For example, Ryzen 7950X for $600 with 32 threads easily runs at full load at 4.5 - 5.0 gigahertz on each core and produces amazing results.

 

Renat Fatkhullin #:

Installer automatically auto-detects which version to install. Livapdate too.

I update all terminals by copying three exe-files (terminal, tester, editor). People keep previous versions in the same form - these three files.

Now claim that they can be different in the same build. And, accordingly, have different performance.

 

Forum on trading, automated trading systems and testing trading strategies

How to get started with MT5, summary!

Fernando Carreiro, 01.09.2023 12:43 pm.

How will this affect Market products in the future?

I assume the validation process will require the product to be compiled without it to ensure the lowest common denominator.

 
fxsaber #:

I update all terminals by copying three exe files (terminal, tester, editor). People keep the previous versions in the same form - these three files.

Now claim that they can be different in the same build. And, accordingly, have different performance.

Exactly - see the presence of AVX in the computer description banner when starting the terminal.


We recommend not blocking updates, because soon terminals will stop with a warning on startup after detecting blocking.

Various farms are constantly getting banned due to:

  1. block updates and pump out hundreds of gigabytes of updates during constant restarts, burdening our infrastructure
  2. erase all caches at the start of the terminal and create a load on brokers' servers
  3. restart terminals in all kinds of dockers/containers/etd with a bare environment tens of thousands of times a day.

Instead of complaining, they need to turn on their heads and think about those who serve them. "I have a 5gb disc and I'm saving money and the traffic is free for me" doesn't bother much if it results in wasting resources of a technology provider or broker.

 
Fernando Carreiro #:

Only programmes compiled in "x64 Regular" mode will be accepted in the market.

Most likely in the future we will expand the possibilities in the market.


MT5 release is scheduled for Friday of next week. That's why we ask you to test new modes more actively.

 
Renat Fatkhullin #:

We recommend not blocking updates, as terminals will soon stop with a warning on startup after blocking is detected.

Are you trading on builds with bugs? I think you are far from the practice of algo-trading.
 
fxsaber #:
Are you trading on builds with bugs? I think you are far from the practice of algo-trading.

So don't upgrade to betas in proda.

Releases come out every 3 months. And those evil farmers, who do not update, sit on outdated versions for a year or more - they do not care about trading. They have a purely utilitarian approach "I have done my task, I don't care about the rest".

I specifically write about evil cases, as their owners certainly read this forum - my explanations are for them.

Reason: