Announcement

Collapse
No announcement yet.

CPU usage

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CPU usage

    I found out that CPU usage differes significantly with eSignal minimized and maximized respectively. Is this normal? From the EFS performance monitor, the EFS overhead is the same in two scenarios. How can I lower the CPU usage?


    --Clearpicks


    with eSignal minimized.
    Attached Files

  • #2
    with eSignal maximized.
    Attached Files

    Comment


    • #3
      normal that GUI takes beaucoups CPUs

      Sure, it's normal. None of the Windows GUI operations take place with minimized windows. This is the best way to do Tick Replay at "warp speed". Start it, and then minimize eSignal until it runs through to the end. Then restore the screen and look at the results.

      Comment


      • #4
        bfry5282,

        Do you think lower screen resolution may decrease the CPU usage? Right now I set the screen resolution of my three monitors to 1920x1200. 1920x1200 and 1280x1024 respectively. How about upgrage my PC to dual cpu? How about upgrage my video cards to the fastest cards available?

        -- Clearpicks

        Comment


        • #5
          video performance

          Some factors affecting performance. First of all, what are you doing that requires such ultra-high performance? ;-)

          1) Screen resolution. Yes, lower resolutions and color depths. I run 4 x 1600 screens with 256 colors, but I could go lower in resolution and be happy. You're not a graphic artist, are you? ;-)

          2) Efficiency of your video driver. Make sure you have latest drivers.

          3) IRQnPriority. You can go into the registry at HTLM\SYSTEM\CurrentControlSet\Control\PriorityCont rol and add a DWORD item IRQnPriority. Check your video card IRQ and i5)f your video card uses IRQ 7, for example, add an item IRQ7Priority = 1. Reboot. This is supposed to work.

          4) Win32PrioritySeparation controls scheduling in same registry location as above. (email me if you want to do this)

          5) If you have lots of memory, consider setting no swap file, if you don't need one.

          6) Check whether your video acceleration is on -- it usually is.

          Good luck !!!

          Comment


          • #6
            Re: video performance

            bfry,

            Thanks. I reduced the number of lines drawn by my EFS and it decreased the CPU usage to <30%, which is acceptable to me. However I need to wait for tomorrow's active trading hour to get the real CPU performance. Could you tell me whether there is any side effects if I adjust the IRQnPriority? If tomorrow I still get high CPU usage, I have to follow all your tips.

            -- Clearpicks

            Originally posted by bfry5282
            Some factors affecting performance. First of all, what are you doing that requires such ultra-high performance? ;-)

            1) Screen resolution. Yes, lower resolutions and color depths. I run 4 x 1600 screens with 256 colors, but I could go lower in resolution and be happy. You're not a graphic artist, are you? ;-)

            2) Efficiency of your video driver. Make sure you have latest drivers.

            3) IRQnPriority. You can go into the registry at HTLM\SYSTEM\CurrentControlSet\Control\PriorityCont rol and add a DWORD item IRQnPriority. Check your video card IRQ and i5)f your video card uses IRQ 7, for example, add an item IRQ7Priority = 1. Reboot. This is supposed to work.

            4) Win32PrioritySeparation controls scheduling in same registry location as above. (email me if you want to do this)

            5) If you have lots of memory, consider setting no swap file, if you don't need one.

            6) Check whether your video acceleration is on -- it usually is.

            Good luck !!!

            Comment


            • #7
              Windows XP Pro scheduler performance tweak

              Windows XP only.

              With regard to the registry entry affecting the scheduler, here is the tweak for Win32PrioritySeparation. Personally, I think it's a good idea because eSignal involves 2 processes, winros.exe and winsig.exe, so scheduling "context switching" happens frequently.

              http://snakefoot.fateback.com/tweak/winnt/tweak.html is the page containing the following description of the bitmasks for this setting.

              HKLM\SYSTEM\CurrentControlSet\Control\PriorityCont rol\Win32PrioritySeparation (dword) for short quanta, equal scheduling quanta, and boost priority to the foreground process. I currently have a value of Hex 26 (Decimal 38).

              Just set this value (it's a DWORD) make sure you have the right number base (decimal) and reboot. You may have to create this key in the registry tree initially.

              Use at your own risk -- very carefully. Registry changes are "brain surgery". ;-) Default value for Win32PrioritySeparation is zero, if you don't want to do this, or want to revert. Or you can delete the item later.

              Comment


              • #8
                Re: Windows XP Pro scheduler performance tweak

                bfry,

                Thanks. I set Win32PrioritySeparation value to Hex 26 and have not seen significant CPU performance improvement yet. ( Maybe there is quite some difference but I just cannot tell ) Right now the CPU usage just varies between 10% ~ 100%, the average value is about 20~30%. So it is ok at this time. Carefully coding EFS might be the best way to control the CPU usage, especially for people like me whose heavily use EFS. I shall go for dual CPU next time when I upgrade my PC.


                -- Clearpicks



                Originally posted by bfry5282
                Windows XP only.

                With regard to the registry entry affecting the scheduler, here is the tweak for Win32PrioritySeparation. Personally, I think it's a good idea because eSignal involves 2 processes, winros.exe and winsig.exe, so scheduling "context switching" happens frequently.

                http://snakefoot.fateback.com/tweak/winnt/tweak.html is the page containing the following description of the bitmasks for this setting.

                HKLM\SYSTEM\CurrentControlSet\Control\PriorityCont rol\Win32PrioritySeparation (dword) for short quanta, equal scheduling quanta, and boost priority to the foreground process. I currently have a value of Hex 26 (Decimal 38).

                Just set this value (it's a DWORD) make sure you have the right number base (decimal) and reboot. You may have to create this key in the registry tree initially.

                Use at your own risk -- very carefully. Registry changes are "brain surgery". ;-) Default value for Win32PrioritySeparation is zero, if you don't want to do this, or want to revert. Or you can delete the item later.

                Comment


                • #9
                  clearpicks,

                  Is the cpu usage due to 'winros' and / or 'winsig' ? It seems really high. If you would like to send me some of your code I could run and review it for you to see if I see anything. If you don't want to, I understand.

                  I saw this winros post and thought you may be able to use this info given the nature of your problems.

                  Comment


                  • #10
                    steve,

                    I believe it is is due to winsig. The CPU usage of winros is almost alway 0, while winsig changes from 0 to ~70 periodically. What I found out is that the overhead of maintaining the lines drawn by drawLineXXX() is pretty high, while eSignal's native candlecharts seem not CPU consuming no matter how many candles are displayed on a chart. From my point of view, the drawing of candlesticks and the lines is the same (using same functions to paint the chart). Another thing which is interesting is that if I leave eSignal to draw inidcator values ( for example, drawn as histogram ), it is significantly faster than I draw it using drawLineXXX. Maybe eSignal can provide a set of lightweight drawing function (with less features) to speed up things in certain scenario.


                    -- Clearpicks

                    Originally posted by stevehare2003
                    clearpicks,

                    Is the cpu usage due to 'winros' and / or 'winsig' ? It seems really high. If you would like to send me some of your code I could run and review it for you to see if I see anything. If you don't want to, I understand.

                    I saw this winros post and thought you may be able to use this info given the nature of your problems.
                    Attached Files
                    Last edited by clearpicks; 10-17-2003, 09:52 AM.

                    Comment


                    • #11
                      cpu for long-running winsig process

                      I stripped out my heavier EFS routines, and thought I had this thing under control. However, winsig.exe's cpu usage creeps up to saturation over the first couple of hours of trading, and basically stays there until it is restarted. So, data is being cached both in temp files, and maybe in a global section,, which results in more and more overhead even during moderate trading volumes. I am using 5s charting, and I assume that the tick data which is being accumulated, is being processed or searched through unnecessarily by winsig.exe. Some internal algorithm needs to be improved in order to consider only the most recent relevant data, and not data from the session start.

                      As a software engineer myself, I know the significance of efficient "sorting and searching" algorithms, even for in-memory data. I know that drawn lines are a significant overhead, and this is one area where efficient processing can be critical. There must be a bunch of searching through arrays in memory, and these arrays get longer and longer. If searches start from the beginning every time, then you get this "cpu creep" during a session.

                      Restart of winsig.exe returns cpu consumption to nominal levels. I hate to restart winsig because I lose all of my tick-related annotations from my EFS routines. So, can you guys please look at what winsig is cacheing, or how it's handling historical sub-minute data in memory, and somehow discard excessive data? I'm running 5s charting with a time template limiting to 2000 prior bars. The only symbol I'm looking at is INTC (Intel).

                      Comment


                      • #12
                        Moreover, when eSignal draws any intraday charts ( especially 60min charts ) for the first time, it is VERY SLOW. It usually takes a few seconds to draw the chart and it draws bar from RIGHT to LEFT, sometimes even causes a few refreshs during this process!

                        Comment

                        Working...
                        X