Keep your Disk Defragged!

Questions about MultiCharts and user contributed studies.
denizen2
Posts: 125
Joined: 17 Jul 2005
Has thanked: 8 times
Been thanked: 1 time

Keep your Disk Defragged!

Postby denizen2 » 25 Sep 2007

Everyone should add to your list of possible reasons for 'excessive' hits on CPU performance this item:

A fragmented disk can cause the tsserver-database-dataserver to push the CPU usage up to 50% or more, even with no charts displayed.... just collecting the 'online' symbols.

[My system has 2GB Ram and a 3GHz Pentium4, running Windows XP; MC ver 2.1.999.999]

I had no idea this problem could be so pronounced :oops: , until I remembered it had been several days since the last time I did a de-frag (using Diskkeeper10), and my computer has been running and collecting tick, minute, daily data for almost 24/7 without turning off the computer. So I rebooted and defragged, and then started up MC again. Now the CPU usage for every thing is less than 2%, and after the initial startup stuff has finished, the tsserver CPU usage close to zero(0.1%).

Perhaps only the reboot was all that was needed, but I suspect the defrag is what really caused the huge difference. Anybody else notice such drastic performance hits caused by disk fragmentation?

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 26 Sep 2007

Hi,

Usually, fragmented disk should not influence CPU performance. It does slow down addressing the disk (just like with any other programs), but it should not affect CPU performance.

Also, for how long exactly was MultiCharts working non-stop? And data for how many symbols was it collecting?

Regards.

denizen2
Posts: 125
Joined: 17 Jul 2005
Has thanked: 8 times
Been thanked: 1 time

Postby denizen2 » 26 Sep 2007

Hi,

Usually, fragmented disk should not influence CPU performance. It does slow down addressing the disk (just like with any other programs), but it should not affect CPU performance.

Also, for how long exactly was MultiCharts working non-stop? And data for how many symbols was it collecting?

Regards.
Thank you for your reply...
I was running MC for less than a week, but more than a couple of days, ... I don't remember exactly. The number of symbols being collected was just for emini-Dow from IQFeed, symbol @YM#. I had four workspaces, each with about 3 charts, and some of the charts combined Volume-bars with time-based bars, e.g., 500 contracts + 5min bars, and another had 500 contracts + 50 contracts-bars on same chart.

Is there considerable more CPU load when plotting volume-bars, and/or volume-bars plus time-interval-bars (intraday)? This was my original suspicion, but when I closed ALL worksheets, there was little reduction on the 50% level for the CPU, so then I closed MultiCharts application next. Still continued to see high (50%) CPU used by the process "tsserver". So next I closed the QuoteManager too, and the CPU level remained about the same high level (for process tsserver). No other application was running accept for my anti-virus and fire-wall (Kaspersky Internet Suite).

The tsserver process continued to run even after closing MC and QuoteManager..... I assume that is what is supposed to happen, right? It continues to collect and store any 'online' symbols, regardless of whether MC or QuoteManager continue to be used, right? In any case, tsserver did continue to run for at least a minute before I decided to reboot, and defrag, and then check everything again.

Any more comments and or corrections to my undertanding would be appreciated.

2haerim
Posts: 502
Joined: 01 Sep 2006
Been thanked: 2 times

When tsServer does not stop running even after MC & QM c

Postby 2haerim » 26 Sep 2007

Hi

I would like to add my experience of tsServer not terminating itself.

Normally tsServer should be terminated automatically within a minute after MC and QM were closed. If not, tsServer might have a bug not terminating itself in some special situatiions.

I also experienced tsServer survived alone after MC and QM were closed. Version is 999.999.

I waited long enough (more than 10 minutes) for COM subsystem to terminate tsServer in case it was orphaned. tsServer kept running.

Next, I opened MC again and plotted a chart (maybe not). And then closed MC again. This time tsServer was closed normally after MC was closed.

This means, I think, tsServer didn't have any problem with its own reference counting, otherwise it should survive again.

So, my conclusion is that there are some special cases in which tsServer somehow misses its own termination.


I hope this helps figuring out problems, if any.

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 27 Sep 2007


Thank you for your reply...
I was running MC for less than a week, but more than a couple of days, ... I don't remember exactly. The number of symbols being collected was just for emini-Dow from IQFeed, symbol @YM#. I had four workspaces, each with about 3 charts, and some of the charts combined Volume-bars with time-based bars, e.g., 500 contracts + 5min bars, and another had 500 contracts + 50 contracts-bars on same chart.

Is there considerable more CPU load when plotting volume-bars, and/or volume-bars plus time-interval-bars (intraday)? This was my original suspicion, but when I closed ALL worksheets, there was little reduction on the 50% level for the CPU, so then I closed MultiCharts application next. Still continued to see high (50%) CPU used by the process "tsserver". So next I closed the QuoteManager too, and the CPU level remained about the same high level (for process tsserver). No other application was running accept for my anti-virus and fire-wall (Kaspersky Internet Suite).

The tsserver process continued to run even after closing MC and QuoteManager..... I assume that is what is supposed to happen, right? It continues to collect and store any 'online' symbols, regardless of whether MC or QuoteManager continue to be used, right? In any case, tsserver did continue to run for at least a minute before I decided to reboot, and defrag, and then check everything again.

Any more comments and or corrections to my undertanding would be appreciated.
Could you please keep monitoring the program's behaviour?

The thing is that such problems were reported in the past but so far we haven't been able to reproduce them on our end. So the more information you provide on how the program responds to different manipulation the easier it would be for us to identify the problem.

2haerim
Posts: 502
Joined: 01 Sep 2006
Been thanked: 2 times

tsServer survives after QM and MC closed

Postby 2haerim » 03 Oct 2007

tsServer from time to time survives after all QM and MC along with other processes were closed.

I experienced tsServer never died once, and in another case, also experienced tsServer silently kills itself after about 11 minutes.


This type of problem existed long time ago and fixed, but the new beta seems to resurrect it.

I don't know the exact pattern yet.

2haerim
Posts: 502
Joined: 01 Sep 2006
Been thanked: 2 times

Multiple QMs make tsServer survives even after ...

Postby 2haerim » 03 Oct 2007

Through many experiments, I think I can make tsServer survive even after all QMs and MCs are closed.

When a single QM is running, tsServer terminates almost instantly.

However, with multiple QMs running, tsServer does NOT terminate right after all QMs and MCs are closed but after about 11 min 30 seconds later.

At least this is what is happening on my PC. I will have to repeat this experiment on another PC and will post the result later.

=> Yes, it is repeated on another PC, too.
Last edited by 2haerim on 03 Oct 2007, edited 1 time in total.

Nick
Posts: 496
Joined: 04 Aug 2006
Has thanked: 4 times
Been thanked: 24 times

Postby Nick » 03 Oct 2007

Disc fragmentation is not nearly as big n issue as it used to be. There are several things that reduce the impact e.g. discs have large on board caches with pre-fetching. Drive speeds have gone up but more importantly the density has gone up enormously this means far less head movement is required to read the same amount of data. Finally The OSes are much better at caching what they need.

Despite this my view is it can't hurt to run it now and then.And it makes you feel good anyway! The other thing that can't hurt is to not to run your disc 'too full' (I work on aprox 1/3rd free space) as the drive fills up contiguous free space becomes scarce. If you get very full (perhaps 90%+) chances are you will get MFT fragmentation and that you really don't want. Is your disc quite full Denzien?

Best thing is a clean install now and then and clean out all the cruft that builds up over time. Trouble is its such a PItA one day I'll remember to make a 'ghost' image of my reference machine. Actually virtual machines seem like they will offer good possibilities just need a stratergy to make use of them.

Cheers,
Nick.

denizen2
Posts: 125
Joined: 17 Jul 2005
Has thanked: 8 times
Been thanked: 1 time

Postby denizen2 » 03 Oct 2007

Re: How full my disk? The disk is 42% full... plenty of room left :) .

Re: Multiple copies of QM running and tsserver not closing quickly. Yes, I also happen to have been running two copies of the QM (I allways am doing this), so the excessive CPU problem (that was the original reason for this topic) might somehow be related to that, rather than the degrag status.

In any case, I have not (yet) seen the excessive CPU problem again, but I will keep monitoring, keeping in mind all of the inputs thus far received. Thank you all.

Cheers,
denizen2 :)

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Re: Multiple QMs make tsServer survives even after ...

Postby Marina Pashkova » 03 Oct 2007

Through many experiments, I think I can make tsServer survive even after all QMs and MCs are closed.

When a single QM is running, tsServer terminates almost instantly.

However, with multiple QMs running, tsServer does NOT terminate right after all QMs and MCs are closed but after about 11 min 30 seconds later.

At least this is what is happening on my PC. I will have to repeat this experiment on another PC and will post the result later.

=> Yes, it is repeated on another PC, too.
Could you please specify in what situation tsSever never terminated?

As for tsServer not terminating itself instantly when several instances of QM have been opened, this is only natural because several instances of QM increase the number of processes and consequently lead to the increase in time required for their termination.

2haerim
Posts: 502
Joined: 01 Sep 2006
Been thanked: 2 times

11 min 30 minutes for termination is NOT normal at all!!!

Postby 2haerim » 03 Oct 2007

Could you please specify in what situation tsSever never terminated?

As for tsServer not terminating itself instantly when several instances of QM have been opened, this is only natural because several instances of QM increase the number of processes and consequently lead to the increase in time required for their termination.
Why don't you repeat it yourself as I described?

1) Open a QM and connect a symbol.
2) Open second QM and connect a symbol.
3) Close both QMs and watch the process list.
4) tsServer stays about 11min 30 seconds and then terminates itself.

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 04 Oct 2007

Dear Haerim,

I did reproduce the problem following your descriptions. However, at that point you did not mention that you only had 2 instances of QuoteManager running each having only 1 symbol connected.

According to the new information you posted, the situation is indeed abnormal.

Thank you for drawing our attention to the issue. We will start working to correct it.

Regards.


Return to “MultiCharts”