Portfolio Trader Optimization - CPU core  [SOLVED]

Questions about MultiCharts and user contributed studies.
User avatar
lingwuchung
Posts: 50
Joined: 03 Feb 2014
Has thanked: 6 times

Portfolio Trader Optimization - CPU core

Postby lingwuchung » 10 Oct 2020

Hi,

I am running MC v12 with 4 cores and 8 threads (Intel i7) machine. Whenever I run optimization in Portfolio Trader, all 8 threads are being 100% used up and I cannot do anything else. Is there a way to limit the no. of cores (e.g. to 3 cores in my case) in Portfolio Trader optimization like the optimization in a single chart signal? Then I can let the PT optimization to take hours to run in background while doing other stuff. Thanks!
Last edited by lingwuchung on 14 Oct 2020, edited 1 time in total.

Gregorian
Posts: 23
Joined: 10 Jan 2018
Has thanked: 3 times
Been thanked: 7 times

Re: Portfolio Trader Optimization - CPU core

Postby Gregorian » 13 Oct 2020

You can do this yourself by creating a .BAT file to start Portfolio Trader using the /AFFINITY option to restrict which cores you want used for this app.

Here is a thread explaining this in more detail: https://www.tenforums.com/performance-m ... d-cmd.html

User avatar
lingwuchung
Posts: 50
Joined: 03 Feb 2014
Has thanked: 6 times

Re: Portfolio Trader Optimization - CPU core

Postby lingwuchung » 19 Oct 2020

You can do this yourself by creating a .BAT file to start Portfolio Trader using the /AFFINITY option to restrict which cores you want used for this app.

Here is a thread explaining this in more detail: https://www.tenforums.com/performance-m ... d-cmd.html
Thanks. I can do this with "start /affinity 7F MCPortfolio.exe" (running at 7 out of my 8 CPU). However, I cannot do this with Multicharts already running. It said "TSServer is already launched on this machine by another user. This user should close all Multicharts64 components.".

If I "start /affinity 7F Multicharts64.exe" and then launch Portfolio Trader from the menu bar of Multcharts, it will occupy all 8 CPUs again.

User avatar
lingwuchung
Posts: 50
Joined: 03 Feb 2014
Has thanked: 6 times

Re: Portfolio Trader Optimization - CPU core

Postby lingwuchung » 24 Oct 2020

You can do this yourself by creating a .BAT file to start Portfolio Trader using the /AFFINITY option to restrict which cores you want used for this app.

Here is a thread explaining this in more detail: https://www.tenforums.com/performance-m ... d-cmd.html
Thanks. I can do this with "start /affinity 7F MCPortfolio.exe" (running at 7 out of my 8 CPU). However, I cannot do this with Multicharts already running. It said "TSServer is already launched on this machine by another user. This user should close all Multicharts64 components.".

If I "start /affinity 7F Multicharts64.exe" and then launch Portfolio Trader from the menu bar of Multcharts, it will occupy all 8 CPUs again.
If I terminate "TSServer.exe" while MC is running, Portfolio Manager can start with /affinity again. However the MC will become halt and cannot work.

Any suggestion? Based on this scenario, it will not help even if I get another new PC with 10 or 20 cores. All of them will be eaten up by PT, leaving me unable to work on anything else. :(

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: Portfolio Trader Optimization - CPU core

Postby TJ » 24 Oct 2020

I always recommend people to use a separate machine for testing, backtesting and optimization.
Computers are not that expensive nowadays. There is no reason not to dedicate a computer for development purpose. That's how professional do it.

User avatar
lingwuchung
Posts: 50
Joined: 03 Feb 2014
Has thanked: 6 times

Re: Portfolio Trader Optimization - CPU core

Postby lingwuchung » 25 Oct 2020

I always recommend people to use a separate machine for testing, backtesting and optimization.
Computers are not that expensive nowadays. There is no reason not to dedicate a computer for development purpose. That's how professional do it.
I do have 2 machines (going to buy a 3rd one) but I still want this feature for the following reasons:

1. I want to make use of the latest code for optimization immediately. Having a separate machines costs the extra code and environment synchronization, which I did try but gave up after several months due to error-prone process.
2. Even I have 3 machines, I would want to optimize on the fastest machine only. I don't have the budget and motivation to upgrade multiple machines to the same processing power at the same time. Well, unless Multicharts can allow me to run optimization on cloud. Is this on roadmap?
3. Multicharts has this "Number of CPU cores to use" in optimization since v12. I am just asking when this could be introducted to Portfolio Manager, which I don't see yet in v14.

User avatar
Kate MultiCharts
Posts: 591
Joined: 21 Oct 2020
Has thanked: 9 times
Been thanked: 148 times

Re: Portfolio Trader Optimization - CPU core  [SOLVED]

Postby Kate MultiCharts » 10 Dec 2020

Hello lingwuchung,

In one of the future releases we are planning to add a new optimization manager in Portfolio Trader.
It’s going to be the same as the one in MultiCharts, it’ll allow controlling the number of engaged cores on the run with a slider.

User avatar
lingwuchung
Posts: 50
Joined: 03 Feb 2014
Has thanked: 6 times

Re: Portfolio Trader Optimization - CPU core

Postby lingwuchung » 10 Dec 2020

Excellent! I have changed to i9 with 20 cores now. As expected all cores are still 100% during portfolio manager optimization but somehow I still manage to do some simple tasks like browser. Guess that’s due to improvement of the i9 processor’s architecture.

User avatar
lingwuchung
Posts: 50
Joined: 03 Feb 2014
Has thanked: 6 times

Re: Portfolio Trader Optimization - CPU core

Postby lingwuchung » 10 Dec 2020

Hello lingwuchung,

In one of the future releases we are planning to add a new optimization manager in Portfolio Trader.
It’s going to be the same as the one in MultiCharts, it’ll allow controlling the number of engaged cores on the run with a slider.
Excellent! I have changed to i9 with 20 cores now. As expected all cores are still 100% during portfolio manager optimization but somehow I still manage to do some simple tasks like browser. Guess that’s due to improvement of the i9 processor’s architecture.


Return to “MultiCharts”