Jump to content
Medved Trader Forums

Very slow response and high cpu in new production version


stock777

Recommended Posts

 First time  in a long while I've seen problems like this.

 I thought I noticed something tonight even on the latest beta before updating  , but used it all day today and no issues.

 Loaded up the new prod build and  not usable.

 

High CPU, not responding errors on various windows in task manager, very slow response to any menu request or clicking on a chart.  Takes up to a minute for the settings menu to come up.   seems like theres some process running in  hard loop

Tried all the easy stuff.

1) deleted the sdata.bin and snews database

2) loaded a backup of settings from last week

3) rebooted pc

 

No luck with any of those .

I sent the log along as well.

 image.thumb.png.06e9ad9d8c45e3f15b207cc50f52a156.png

Edited by stock777
xx
Link to comment
Share on other sites

 Keep in mind Ive made no changes other than this months Windows Update over the weekend.  And MT seemed to run well enough today, before updating to the new prod version .

 I use the built in Microsoft Defender,   and nothing else.

 I added any dirs to the exclusions that werent there, and no diff in the problem.

 

 Whats the easiest way for me to rollback to the previous beta .  I can restore from a recent  drive backup  but if theres a more direct way, lets try that

Link to comment
Share on other sites

This is the stack for that process

 

dont think anything should be using 6-8% cpu

 

ntdll.dll!RtlMoveMemory+0x1d3
ntdll.dll!RtlReleaseSRWLockShared+0xeb9
ntdll.dll!RtlReAllocateHeap+0x2a3
ntdll.dll!RtlReAllocateHeap+0x7d
gdiplus.dll!GdipCreateBitmapFromScan0+0x15f29
gdiplus.dll!GdipCreateBitmapFromScan0+0x18a55
gdiplus.dll!GdipCreateBitmapFromScan0+0x1781d
gdiplus.dll!GdipCreateBitmapFromScan0+0x1674b
gdiplus.dll!GdipMultiplyMatrix+0xb03
gdiplus.dll!GdipCreateBitmapFromScan0+0x1b513
gdiplus.dll!GdipMultiplyMatrix+0x8cd
gdiplus.dll!GdipCreateBitmapFromScan0+0x19706
gdiplus.dll!GdipCreateBitmapFromScan0+0x109b3
gdiplus.dll!GdipDrawRectangle+0x54d
gdiplus.dll!GdipDrawRectangle+0x4a9
gdiplus.dll!GdipSetMatrixElements+0x7d7
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+0x27b
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+0xcba
[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__DisplayClass78_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

 Not sure why I didnt hear back from you so went ahead tried restoring the prev working version (only the main program directory) , which did not seem to help.  No idea how this went to crap so fast

 Loaded the BASIC layout, and that of course has no problem with cpu.

 Restored successively  older layouts of mine  until one finally seemed relatively stable, and at least I could use the program. 

  Noticed that one very busy thread (posted in the prev message) is still chewing cpu with a big difference,  the usage ebbs and flows, where in the bad layouts , the usage is a CONSTANT 6-8%, causing severe unresponsiveness.

 

 So theres something in my layout that all of a sudden is not playing nice.

Edited by stock777
Link to comment
Share on other sites

MT writes to disk all the time, because we use memory-mapped files to keep the market data. That is how we keep the memory footprint of MT reasonably low.

Some (most?) anti-virus software just stupidly monitors EVERY disk write for who knows what. That slows things down quite a bit.

Unfortunately we cannot just disable that on our end. That is why we ask you to disable it on your anti-virus by excluding MT.

Link to comment
Share on other sites

  I thought I was clear that restoring a previous layout fixed  the issue

  I think that pretty much eliminates outside factors

  no ?

  I even disabled the AV scanner just to check for that . 

  If you have the most recent layout from my debug upload, look at it.  If not I can resend the zip

 

Link to comment
Share on other sites

 You talking about   mt.exe ?  Thought  excluding the folder covered everything in it

  Still dont get why the focus on AV here.  I've been using MT since DAY 1, under the exact same conditions, and all of a sudden something extreme showed up .

   You really think this is AV related ???  Anything possible , but it wouldnt be my first guess

 

Link to comment
Share on other sites

 Actually, I never used the process exclusion function , and barely noticed it.  Never needed to .  Learn something every day.

 I added it , but notice no change in cpu usage, at least with the current working layout.  

 When I get a chance later I'll test the broken layout  again with this new exclusion

 

Link to comment
Share on other sites

 Like I said, this problem appeared out of nowhere. Seemed to happen on the update to new build, but I'm running that now with no issue .

 Did you identify  which function the thread info  I posted about was related to ?

No question that's where the problem was showing up.

Just looked at the thread screen again in proc explorer.    NOT seeing that  6% cpu usage at all, and thats while now running TWO other high usage apps !  alongside.  IB and TOS.

Possible theres some weird after hours bug, but I'll check it later. Curious to see if excluding the process made a diff.  Like I say, been running MT for YEARS and never had to do that , or for any other program for that matter

 

'image.png.0820a7954ffecb14515a36b5b4fe2878.png

Edited by stock777
Link to comment
Share on other sites

odd you have a DOM lag on new update, i just wanted to let jerry know the DOM recentre is at least 4 times faster to catch bid/ask on this last update, huge improvement, especially when trading NQ/MNQ TX :)

*sorry this was meant for a DOM slow update thread...

 

Edited by innzinn
Link to comment
Share on other sites

4 hours ago, Jerry Medved said:

there is no way to tell what the thread was just like that. in order to match the thread, we would need to get a "dump" of the running process, which you can do via right click on the process in the task manager and send it to us. and indicate exact thread #

 

I thought that  long stack trace i posted above last night would have given enough info to determine what the process parent  was ?

 

Link to comment
Share on other sites

  Well, a very strange mix of things not working, then working, has me stumped as to what the issue is/was

  Since the problem first occurred late last night, with very little data written to disk, I'm skeptical that the AV was the culprit.  It never has been , so unless MSFT did something really odd in the latest  April update to change the AV behavior ...

  I added the MT.exe process exclusion, and think I reloaded what WAS a problematic layout/settings combo, and now its ok. Not getting that CPU spike in the single thread.

  Removing that exclusion for testing , seems to have no effect at all.

 

  So I have no idea what fixed it 🤔   Sorry to say.   

  Hopefully its fixed for good. 

 

 

  

 

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...