Jump to content
Medved Trader Forums

CPU usage seems high for 2AM


stock777

Recommended Posts

  There is one thread  that uses quite a bit of cpu , even though nothing is going on at 2am.   Turning off quotes and alert system doesnt seem to matter.

  I dont have debugging tools installed so the name is meaningless, but this is the call stack of the TID in question.

  Running latest beta as of 8/31

 

Does this look normal ?

 image.png.b948f25f737653a692867880985dcfcf.png

 

gdiplus.dll!GdipSaveImageToFile+0x690
gdiplus.dll!GdipGetImageHeight+0x23a1
gdiplus.dll!GdipCreateBitmapFromScan0+0x19400
gdiplus.dll!GdipCreateBitmapFromScan0+0x176ce
gdiplus.dll!GdipCreateBitmapFromScan0+0x168cb
gdiplus.dll!GdipMultiplyMatrix+0xae7
gdiplus.dll!GdipCreateBitmapFromScan0+0x1b7a3
gdiplus.dll!GdipMultiplyMatrix+0x8b1
gdiplus.dll!GdipCreateBitmapFromScan0+0x19996
gdiplus.dll!GdipCreateBitmapFromScan0+0x10a53
gdiplus.dll!GdipDrawRectangle+0x54d
gdiplus.dll!GdipDrawRectangle+0x4a9
gdiplus.dll!GdipSetMatrixElements+0x897
gdiplus.dll!GdipDrawLines+0xb2
gdiplus.dll!GdipDrawLinesI+0xa3
[Native Frame: IL Method without Metadata]
[Managed to Unmanaged Transition]
C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll!System.Drawing.Graphics.DrawLines+0x99
D:\Program Files\Medved Trader\TeeChart.Client.dll!Steema.TeeChart.Drawing.Graphics3DGdiPlus.DrawCurve+0x376
D:\Program Files\Medved Trader\TeeChart.Client.dll!Steema.TeeChart.Styles.FastLine.Draw+0x275
D:\Program Files\Medved Trader\TeeChart.Client.dll!Steema.TeeChart.Styles.Series.DrawSeries+0x935
D:\Program Files\Medved Trader\TeeChart.Client.dll!Steema.TeeChart.Chart.DoDraw+0x390
D:\Program Files\Medved Trader\TeeChart.Client.dll!Steema.TeeChart.Chart.DrawAllSeries+0x197
D:\Program Files\Medved Trader\TeeChart.Client.dll!Steema.TeeChart.Chart.InternalDraw+0x7ce
D:\Program Files\Medved Trader\TeeChart.Client.dll!Steema.TeeChart.Chart.InternalDraw+0x31
D:\Program Files\Medved Trader\TeeChart.Client.dll!Steema.TeeChart.TChart.Draw+0xa61
D:\Program Files\Medved Trader\TeeChart.Client.dll!Steema.TeeChart.TChart.OnPaint+0x310
C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll!System.Windows.Forms.Control.PaintWithErrorHandling+0x67
C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll!System.Windows.Forms.Control.WmPaint+0x3d2
C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc+0x320
C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.Callback+0xc2
[Unmanaged to Managed Transition]
[Native Frame: IL Method without Metadata]
clr.dll+0x222e
USER32.dll!CallWindowProcW+0x3f8
USER32.dll!DispatchMessageW+0x39c
USER32.dll!SendMessageTimeoutW+0x143
ntdll.dll!KiUserCallbackDispatcher+0x24
win32u.dll!NtUserCallHwndLock+0x14
[Native Frame: IL Method without Metadata]
[Managed to Unmanaged Transition]
C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll!System.Windows.Forms.Control.Update+0x30
D:\Program Files\Medved Trader\MT.exe!MT.ChartInfo.RefreshChart+0x46f
D:\Program Files\Medved Trader\MT.exe!MT.ChartWindowCharts.RefreshAll+0xb5
D:\Program Files\Medved Trader\MT.exe!MT.ChartWindow.InvalidateChart+0x6d
D:\Program Files\Medved Trader\MT.exe!MT.ChartWindow.RecalcAndPaintAllCharts+0xce5
[Unmanaged to Managed Transition]
clr.dll!LogHelp_TerminateOnAssert+0x1b93
clr.dll!LogHelp_TerminateOnAssert+0x1aa4
clr.dll!MetaDataGetDispenser+0x32cd2
clr.dll!MetaDataGetDispenser+0x33145
[Managed to Unmanaged Transition]
C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll!System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal+0x84
C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll!System.Delegate.DynamicInvokeImpl+0xa0
C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll!System.Windows.Forms.Control.InvokeMarshaledCallbackDo+0x9d
C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll!System.Windows.Forms.Control.InvokeMarshaledCallbackHelper+0x69
C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll!System.Threading.ExecutionContext.RunInternal+0x172
C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll!System.Threading.ExecutionContext.Run+0x15
C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll!System.Threading.ExecutionContext.Run+0x55
C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll!System.Windows.Forms.Control.InvokeMarshaledCallback+0xbc
C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll!System.Windows.Forms.Control.InvokeMarshaledCallbacks+0xe6
C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll!System.Windows.Forms.Control.WndProc+0x509
C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll!System.Windows.Forms.NativeWindow.Callback+0xc2
[Unmanaged to Managed Transition]
[Native Frame: IL Method without Metadata]
clr.dll+0x222e
USER32.dll!CallWindowProcW+0x3f8
USER32.dll!DispatchMessageW+0x259
[Native Frame: IL Method without Metadata]
[Managed to Unmanaged Transition]
C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll!ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop+0x341
C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll!ThreadContext.RunMessageLoopInner+0x1c7
C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll!ThreadContext.RunMessageLoop+0x52
D:\Program Files\Medved Trader\MT.exe!<>c__DisplayClass86_0.<CreateInThread>b__0+0x306
C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll!System.Threading.ExecutionContext.RunInternal+0x172
C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll!System.Threading.ExecutionContext.Run+0x15
C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll!System.Threading.ExecutionContext.Run+0x55
C:\WINDOWS\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll!System.Threading.ThreadHelper.ThreadStart+0x55
[Unmanaged to Managed Transition]
clr.dll!LogHelp_TerminateOnAssert+0x1b93
clr.dll!LogHelp_TerminateOnAssert+0x1aa4
clr.dll!LogHelp_TerminateOnAssert+0x2358
clr.dll!MetaDataGetDispenser+0x12a2f
clr.dll!LogHelp_TerminateOnAssert+0x2f50
clr.dll!LogHelp_TerminateOnAssert+0x2ec3
clr.dll!LogHelp_TerminateOnAssert+0x2e02
clr.dll!LogHelp_TerminateOnAssert+0x2fe7
clr.dll!MetaDataGetDispenser+0x12919
clr.dll!LogHelp_TerminateOnAssert+0x6835
KERNEL32.dll!BaseThreadInitThunk+0x14
ntdll.dll!RtlUserThreadStart+0x21

 

Link to comment
Share on other sites

Thought all you needed was the the high usage  thread ID , which I provided.

Next day I ran into that occasional memory hog thing I've seen in the past,  and reset the quotes data back to zero .  The high usage might have been an early warning of some corruption.

I saw those news  feed errors in the log, but thought it was CNBC .  If I see the problem again, Ill try turning off Ally .

Link to comment
Share on other sites

  • 2 weeks later...

right now at 1030pm theres nothing happ and yet MT spikes to 10% consistently  . My other apps use near zero 

Loading your built in BASIC LAYOUT, its much better behaved, very little usage

So something in my layout is causing excessive cpu usage 24/7

I've tried disabling various elements but no luck finding the cause.

 

 

 

Edited by stock777
Link to comment
Share on other sites

do you have a task manager that lets you see individual threads and their CPU utilization? If not, can you get something like https://www.anvir.com/

then, when the issue occurs, view the threads for MT sorted by CPU usage  in order to identify which one is using the high CPU. Take a screenshot, then also "Create a DUMP File"  - in regular task manager, right click on MT.EXE  and select that menu item. note were it saves it, zip it and send it to us NOTE: The file will be too large to email. Please send it to us using https://wetransfer.com/

Or one of the other cloud storage sites (dropbox, google drive, etc)

Send a log as well just to be sure. 

Make sure you are running the latest beta or prod at  the time. will make it easier to track down.

Link to comment
Share on other sites

with crypto, there is no "middle of the night". They always trade, including volume. The highest CPU thread is the chart for #BTC.USD and #ETH.USD on it. @ES charts with 0.25 frequency is another.  Crypto has way more ticks than usual equities plus the time period for each day is 4 times that of stocks, so the load tends to be higher. I have your setup from a month ago, so can't tell for sure, and can't run it on weekend right now but pretty sure that is the CPU usage you are seeing and it is normal.

 

Link to comment
Share on other sites

   I am aware that the crypto feed is 27/4 and fast.  I did some testing with that disabled already .

  Did some more testing and apparently the crypto feed and a chart is enough to   cause those spikes over 10% usage.   I have the chart update setting cranked all the way down.  If I raise it up, cpu usage is even higher, as expected.

  Seemed strange to me, because during the day, the CPU usage is NOT that much higher, even though all the stocks are ticking, and alerts are firing all the time.

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...