This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS 5.5 high CPU load when TI Resource Explorer open

Other Parts Discussed in Thread: CCSTUDIO

With CCS 5.5.0.00077 running on Windows XP SP3 I found that CCS was taking a high CPU load even wasn't using CCS. i.e. start CCS 5.5 and open a workspace and CCS was using one CPU continuously even though wasn't using the CCS IDE and hadn't (yet) started a debug session.

Investigation showed:

1) The high CPU load appears to be related to when the TI Resource Explorer is open. i.e. close the TI Resource Explorer and the CCS CPU load drops to zero when idle. Reopen the TI Resource Explorer and CCS starts using one CPU continuously again.

2) With the TI Resource Explorer open and CCS using one CPU continuously, the SysInternals Process Monitor tool shows CCS apparently spending most of its time re-reading .XML files under <ccs_install_root>\ccsv5\common\targetdb

3) I have seen this behavior on the two Windows XP SP3 used for CCS.

 

Can anyone else repeat this?

  • Hi Chester,

    Seems to be working fine with my Win7 64bit. No substantial CPU loads observed at all.

    Regards,

    Gautam

  • Chester Gillon said:
    Can anyone else repeat this?

    This is not as repeatable as I first thought. On a WinXP SP3 PC with the same CCS 5.5 installation have two workspaces.

    The first workspace which has numerous projects causes CCS to use one CPU continuously when the TI Resource Explorer is open.

    Another workspace which contains a single project doesn't cause CCS to use any CPU when idle when the TI Resource Explorer is open.

    i.e. the problem appears workspace related.

  • Chester - it could be the indexer that is causing the high CPU usage. You can check this by turning it off and see if that helps.

    See slide 33 of: http://software-dl.ti.com/ccs/non-esd/training/CCSv5-TipsAndTricks.pptx

    Thanks

    ki

  • I had a typo in the original link which has been fixed.

  • Ki-Soo Lee said:
    Chester - it could be the indexer that is causing the high CPU usage. You can check this by turning it off and see if that helps.

    I turned off the indexer, and the high CPU usage still occurred.

    Given that I have two workspaces which show the problem, and one which doesn't, will try and find out what the difference is.

  • For the two workspaces that exhibit the issue, do they both have many projects open in the workspace?

  • Ki-Soo Lee said:
    For the two workspaces that exhibit the issue, do they both have many projects open in the workspace?

    On further investigation the amount of CPU taken when the TI Resource Explorer is open depends upon the number of projects in the workspace:

     - On the workspace with 33 projects in the workspace CCS takes 50% CPU (one CPU core).

     - On the workspace with only one project in the workspace the CPU usage taken by CCS fluctuates between 0% and 15%

    - On the workspace with 33 projects, and the TI Resource Explorer open, as projects were removed from the workspace the CPU load taken by CCS reduced. 

  • This is a known behavior of Eclipse. The larger the workspace folder (the more projects associated with it), the greater the impact on performance on CCS (Eclipse).

    Try some of the suggestions as mentioned on slide 5 of the tips and tricks presentation I referenced earlier.

    Another tip is to close projects (not remove, but close them). Closed projects do not use an Eclipse resources.

    Thanks

    ki

  • Ki-Soo Lee said:
    This is a known behavior of Eclipse. The larger the workspace folder (the more projects associated with it), the greater the impact on performance on CCS (Eclipse).

    I am not sure that the CPU load can be explained by known Eclipse behavior, since the high CPU load occurs when the TI Resource Explorer is open. As an example, in a Workspace with 33 projects open left CCS idle for one minute, with the TI Resource Explorer not on display. A summary of the file access performed by CCS 5.5 (taken with Windows Process Explorer) is:

    This shows the CCS wasn't reading or writing any files, but only opening files / directories which were in the workspace, presumably as part of the Eclipse behavior to monitor for changes to projects. The CCS CPU load was reported as <1% during this time.

    The TI Resource Explorer was then opened and the CPU load increases to 50% (one CPU on a dual CPU machine). Using Process Monitor to watch file access by CCS for one minute showed a summary of:

    i.e. the act of opening the TI Resource Explorer causes CCS to read from files, such at 43 times more file events occured when the TI Resource Explorer wasn't open. The majority of file events triggered when the TI Resource Explorer are the reading of .xml files in the ccsv5\base\common\targetdb directory. I can't see why CCS needs to do that when the CCS IDE isn't actively being used.

    Ki-Soo Lee said:
    Another tip is to close projects (not remove, but close them). Closed projects do not use an Eclipse resources.

    Thanks for that tip - I didn't know about closing projects. With the TI Resource Explorer open the only way to stop CCS reading the .xml files in the ccsv5\base\common\targetdb directory was to close all projects in the workspace.

    Ki-Soo Lee said:
    Try some of the suggestions as mentioned on slide 5 of the tips and tricks presentation I referenced earlier.

    OK, will do.

  • Ki-Soo Lee said:
    Try some of the suggestions as mentioned on slide 5 of the tips and tricks presentation I referenced earlier

    To clean-up I:

    - Deleted the .metadata directory from the Workspace

    - Deleted the Local Settings\Application Data\.TI\2803439191 directory from the Windows profile where CCS 5.5 stores some cached data

    - Imported all projects back into the workspace

    The high CPU load was still there when the TI Resource Explorer was opened.

    Are there any other directories where CCS stores cached data that I could try and clean (delete)?

  • Performed some further investigation to see where the high CPU load is coming from, in a workspace with 33 projects open and the TI Resource Explorer on display. Windows Process Explorer shows a "cyclic" CPU load, in that appears to use one CPU continuously for several seconds, drop to zero CPU load and then return to using one CPU continuously:

    The Threads view of Process Explorer shows that it is one thread that is taking the CPU when CCS is idle and the TI Resource Explorer is on view. When ccstudio.exe is started with the -console option and a java thread dump is generated, the thread with the high CPU load has a stack trace of the following form:

    "Worker-7" prio=6 tid=0x2d3c7400 nid=0x544 runnable [0x3275f000..0x3275fa94]
       java.lang.Thread.State: RUNNABLE
            at java.io.WinNTFileSystem.getBooleanAttributes(Native Method)
            at java.io.File.exists(Unknown Source)
            at com.ti.ccstudio.system.setup.HardwareDatabaseReader.convertToAbsPath(HardwareDatabaseReader.java:236)
            at com.ti.ccstudio.system.setup.SystemSetupReader$CpuCache$IncludeFileOperation.getAbsolutePath(SystemSetupReader.java:1464)

            at com.ti.ccstudio.system.setup.SystemSetupReader$CpuCache$IncludeFileOperation.addToListOfSetupElements(SystemSetupReader.java:1489)
            at com.ti.ccstudio.system.setup.SystemSetupReader$CpuCache$CpuCacheItem.addToListOfSetupElements(SystemSetupReader.java:1647)
            at com.ti.ccstudio.system.setup.SystemSetupReader$CpuCache$CpuCacheItem.getSetupElements(SystemSetupReader.java:1671)
            at com.ti.ccstudio.system.setup.SystemSetupReader$CpuCache.getFilteredListOfSetupElements(SystemSetupReader.java:2028)
            at com.ti.ccstudio.system.setup.SystemSetupReader.getFilteredListOfCpus(SystemSetupReader.java:2483)
            at com.ti.ccstudio.system.setup.SystemSetupWriter$ComponentList.getFilteredListOfComponents(SystemSetupWriter.java:180)
            at com.ti.ccstudio.system.setup.SystemSetupWriter$ComponentList.getFilteredListOfComponents(SystemSetupWriter.java:1)
            at com.ti.ccstudio.system.setup.SystemSetupEditor.getBoardsAndDevices(SystemSetupEditor.java:3556)
            at com.ti.ccstudio.system.setup.SystemSetupEditor.getConnectionAndDevice(SystemSetupEditor.java:3521)
            at com.ti.ccstudio.system.setup.SystemSetupEditor.getBasicProperties(SystemSetupEditor.java:3275)
            at com.ti.ccstudio.system.setup.SystemSetupEditor.getConnection(SystemSetupEditor.java:2014)
            at com.ti.ccstudio.project.core.util.ProjectCoreUtils.getConnection(ProjectCoreUtils.java:1116)
            at com.ti.ccstudio.project.ui.internal.resexplorer.ResourceExplorerProjectDelegate.getConnection(ResourceExplorerProjectDelegate.java:404)
            at com.ti.ccstudio.internal.resource.explorer.StatusMonitor.getProjectsWithConnection(StatusMonitor.java:173)
            at com.ti.ccstudio.internal.resource.explorer.StatusMonitor.access$4(StatusMonitor.java:167)
            at com.ti.ccstudio.internal.resource.explorer.StatusMonitor$1.run(StatusMonitor.java:99)
            at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

    Based upon this stack trace, and the previous use of Processor Monitor which showed CCS reading the xml files under ccsv5\base\common\targetdb, suggests the problem is that when the TI Resource Explorer is on display the TI Resource Explorer repeatidly re-reads the target device files from the CCS installation. Not sure if this is a "bug", or a problem with my installation.

  • I have seen the same symptoms with CCS 5.4 running on 32-bit Windows Vista, in that when the TI Resource Explorer is on display:

    - CCS is consuming CPU load

    - CCS is reading the xml files under ccsv5\base\common\targetdb

  • Chester - thanks for all the analysis you've done. I'll see if I can reproduce the issue, using all the information you've give me.

    Also - what the specs of your main PC where you first saw the issue? Processor and RAM is what I am interested in.

    Thanks

    ki

  • Ki-Soo Lee said:
    Also - what the specs of your main PC where you first saw the issue? Processor and RAM is what I am interested in.

    The main PC where the problem was first seen has dual AMD Opteron 250 2.4 GHz CPUs and 4Gbytes of RAM. On the main PC with around 30 projects open in a workspace CCS was taking a noticeable 50% of CPU when otherwise idle and the TI Resource Explorer open.

  • A colleague of mine was able to reproduce the issue. It looks related to the resource explorer as you suspected. An enhancement request has been filed for this. Tracking ID: SDSCM00049056

    Thanks

    ki