TailBlazer icon indicating copy to clipboard operation
TailBlazer copied to clipboard

High CPU utilization

Open lazycoder-ru opened this issue 9 years ago • 13 comments
trafficstars

I have log file, that updates over 100 times per second. And TailBlazer uses over 30% cpu while viewing this log. Is it normal?

lazycoder-ru avatar May 17 '16 19:05 lazycoder-ru

@lazycoder-ru it has been a while since I have checked heavy duty performance so I am not sure what effect any recent changes may have had.

However it is natural for a busy log file with lots of updates on a graphics intensive system to be cpu intensive. To mitigate against this I will consider adding a setting to allow the user to adjust the refresh rate. Btw it is currently set at 250ms and I suspect setting it to 1s would be sufficient for most peoples purposes.

RolandPheasant avatar May 17 '16 20:05 RolandPheasant

@RolandPheasant I've tried to use BairTail and SnakeTail to view this log, and they not so greedy with cpu. But, as I can see, they have high refresh rate. I really liked TalBlazer and cpu issue it's one thing that holds me from using on production.

lazycoder-ru avatar May 17 '16 20:05 lazycoder-ru

I also just found some optimisations which I will apply. Also I will put it on my agenda to have a general round of hunting for optimisations + I will add some perf related settings.

Btw in my previous job I used to test TB with log files which grew to 10Mb then roll over every minute, I remember the cpu being high but it never effected other apps.

RolandPheasant avatar May 17 '16 21:05 RolandPheasant

@lazycoder-ru are you able to build the code yourself? If so I will notify you of any changes as I do them

RolandPheasant avatar May 17 '16 21:05 RolandPheasant

Yes, I can build code by myself. Any dependence libs? I will be very appreciate for notifications about performance improvements.

lazycoder-ru avatar May 18 '16 20:05 lazycoder-ru

@lazycoder-ru I have created a experiment branch - see Optimisations.

To build it you will need vs2015. If you have not got it you can always download the community edition for free. All you need to do is grab the branch, build in release mode and run TailBlazer.exe

So far I have made the following changes

  1. Slow down file refresh rate from 0.25s to 0.5s
  2. Reduce the animations refresh rate
  3. Make optimisations in the file analysing code.

I am interested to know how much difference these change make to your file

I am not sure how much diff this will make for you. After trying these you can also turn off the tail highlighting as this seems to be a cpu guzzler. Do this by de-selecting 'Highlight-Tail?' check box

image

The changes have broken log roll-over handling and all I am looking for on this branch is to guage what difference these make for you

RolandPheasant avatar May 19 '16 20:05 RolandPheasant

Yes, now its much better. Now it's using up to 8% CPU on same log update rate and hardware. Selecting and deselecting checkbox "Highlight-Tail" isn't make any visible difference in cpu usage. Is it able to make option to turn off all animations and fadings(on mouse hover)?

lazycoder-ru avatar May 22 '16 16:05 lazycoder-ru

I am very pleased my changes work for you. What I will do is implement the changes and provide on option to slow the refresh rate.

The highlight-tail option made a slight difference on my machine and I was interested to see whether the graphic on your was contributing to the cpu storm.

Currently the highlight tail option is purely that. I will look into other areas of graphic to see whether I can make things even better.

RolandPheasant avatar May 22 '16 18:05 RolandPheasant

@lazycoder-ru I have scrapped the previous branch and created a new one where I give performance options. See ExtraOptimisationOptions

ratings2

Can you build that branch and let me know if it works for you. Thanks

When you change the rating is adjusts the frame rate and file scan rate which has an impact on CPU. I have done it this way because it allows me to have flexibility with bringing in future optimisations.

RolandPheasant avatar May 31 '16 21:05 RolandPheasant

Any news on when this will be released? I see very high CPU usage and very slow performance when scrolling on a moderately sized log file (175mb).

DanielSundberg avatar Sep 26 '16 05:09 DanielSundberg

Have you tried to adjust the ratings as doing so reduce the graphics frame rate and the file refresh rate. Also are you monitoring a file on a local or network drive? If local is it an ssd?

Apart from that my current task is a rewrite of the way that tailblazer tails and scrolls. The reason for this is due problems with keyboard navigation issues which stems from the way which files are virtualised. As part of this I will be paying close attention to all aspects of performance.

I do not have an eta as I am effectively replacing the heart of the system. But hopefully this can be achieved within a few weeks.

RolandPheasant avatar Sep 26 '16 06:09 RolandPheasant

Reducing performance rating makes the situation a bit better. This is a server running on a "local cloud".

paying close attention to all aspects of performance sounds like a good idea. For now I'll go back to tail and grep.

DanielSundberg avatar Sep 26 '16 06:09 DanielSundberg

I will let you know when I have made the first cut for testing

RolandPheasant avatar Sep 26 '16 06:09 RolandPheasant