Results 1 to 5 of 5

Thread: Slow / Non-responsive: Qt, Konsole, Xterm, Git

  1. #1

    Default Slow / Non-responsive: Qt, Konsole, Xterm, Git

    I am experiencing a strange quirk with my terminal applications. Konsole and Xterm both exhibit the same behavior. When I try to run certain commands in either, the console hangs and appears non-responsive. I can execute the following commands just fine:

    Code:
    touch
    ls
    cd
    nano file
    chmod
    mkdir
    But I get exceptionally slow / non-responsive performance when I try to run any git commands, or try to run Qt console programs for debugging and testing. I don't get any error messages. Just not returned output and no return to the command prompt. It's like the command just hangs indefinitely. I have tried waiting for up to 10 minutes, and nothing. CTRL-C still breaks out the command successfully.

    I'm not even sure how to start debugging it. Here are the following things I have tried:

    • delete kde profile and let it create a new default profile. Also cleared all kde user settings in local /tmp/ directory.
    • Completely format the hard drive and do a fresh install of the software.
    • On suspicion that it may be a problem with the files accessed on the NFS mounted drive, I copied
    • Tried running Qt applications with the following command: /usr/bin/konsole --nofork -e
    • Tried running Qt applications with the following command: /usr/bin/xterm -e
    • tried running git init in new directory as root user: normal response time.
    • tried running git init in new directory as normal user: normal response time.


    The problems seems to be isolated to git and Qt. Anyone have ideas of what I can do next for troubleshooting?

    I have included output from the system monitor while running the command git add * in Konsole.

    System Specifications
    ======================================
    Opensuse 12.3 (fresh install)
    Desktop: KDE 4.10.00 "release 1"
    Processor: AMD Athlon 64 X2 Dual Core., 2.7Ghz

    System Monitor Output
    =======================================
    Code:
    nicholas@behemoth:~> top
    top - 19:40:02 up 27 min,  4 users,  load average: 0.85, 0.52, 0.54
    Tasks: 144 total,   1 running, 143 sleeping,   0 stopped,   0 zombie
    %Cpu(s): 11.1 us,  4.4 sy,  0.0 ni, 64.7 id, 19.8 wa,  0.0 hi,  0.0 si,  0.0 st
    KiB Mem:   4056576 total,  1742448 used,  2314128 free,    41708 buffers
    KiB Swap:  8385532 total,        0 used,  8385532 free,   724188 cached
    
      PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM     TIME+ COMMAND                                                  
     4165 nicholas  20   0 1460m 235m  49m S 11.6  5.9   5:03.57 firefox                                                  
     4388 nicholas  20   0  533m  44m  23m S  4.6  1.1   0:04.63 konsole                                                  
     4673 nicholas  20   0  530m  47m  24m S  4.6  1.2   0:52.45 ksysguard                                                
     4046 nicholas   9 -11  506m 9920 6444 S  3.6  0.2   0:50.13 pulseaudio                                               
     3322 root      20   0  172m  89m  58m S  2.3  2.3   0:55.73 Xorg                                                     
     4246 nicholas  20   0  433m  48m  24m S  1.7  1.2   0:22.19 plugin-containe                                          
     5137 nicholas  20   0 20760 6120 1460 D  1.7  0.2   0:01.44 git                                                      
      488 root      20   0  585m 1512 1096 S  0.3  0.0   0:00.36 nscd                                                     
     4013 nicholas  20   0  637m  77m  42m S  0.3  1.9   0:42.10 kwin                                                     
     4020 nicholas  20   0 1270m 136m  50m S  0.3  3.4   0:14.61 plasma-desktop                                           
     4087 nicholas  20   0  146m  13m 1136 S  0.3  0.3   0:00.11 python                                                   
     4675 nicholas  20   0  9844 1292  848 S  0.3  0.0   0:03.50 ksysguardd                                               
     4801 root      20   0     0    0    0 S  0.3  0.0   0:00.44 kworker/1:2                                              
     5138 nicholas  20   0 23636 1756 1204 R  0.3  0.0   0:00.05 top                                                      
        1 root      20   0 48032 4564 2092 S  0.0  0.1   0:00.90 systemd                                                  
        2 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kthreadd                                                 
        3 root      20   0     0    0    0 S  0.0  0.0   0:00.54 ksoftirqd/0                                              
        5 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 kworker/0:0H                                             
        7 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 kworker/u:0H                                             
        8 root      rt   0     0    0    0 S  0.0  0.0   0:00.00 migration/0                                              
        9 root      -2   0     0    0    0 S  0.0  0.0   0:00.43 rcuc/0                                                   
       10 root      -2   0     0    0    0 S  0.0  0.0   0:00.00 rcub/0                                                   
       11 root      20   0     0    0    0 S  0.0  0.0   0:01.57 rcu_preempt                                              
       12 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rcu_bh                                                   
       13 root      20   0     0    0    0 S  0.0  0.0   0:00.00 rcu_sched                                                
       14 root      rt   0     0    0    0 S  0.0  0.0   0:00.01 watchdog/0                                               
       15 root      rt   0     0    0    0 S  0.0  0.0   0:00.00 watchdog/1                                               
       16 root      -2   0     0    0    0 S  0.0  0.0   0:00.56 rcuc/1                                                   
       17 root      20   0     0    0    0 S  0.0  0.0   0:00.82 ksoftirqd/1                                              
       18 root      rt   0     0    0    0 S  0.0  0.0   0:00.00 migration/1                                              
       20 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 kworker/1:0H                                             
       21 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 cpuset                                                   
       22 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 khelper                                                  
       23 root      20   0     0    0    0 S  0.0  0.0   0:00.00 kdevtmpfs                                                
       24 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 netns                                                    
       25 root      20   0     0    0    0 S  0.0  0.0   0:00.00 bdi-default                                              
       26 root       0 -20     0    0    0 S  0.0  0.0   0:00.00 kintegrityd

  2. #2
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,308
    Blog Entries
    2

    Default Re: Slow / Non-responsive: Qt, Konsole, Xterm, Git

    Are you running git from the command line or using a graphical browser? Because otherwise they don't sound likely related.

    Also, if you haven't done so at least once after a new install or upgrade you should update your system with the following
    Code:
    zypper up
    TSU

  3. #3

    Default Re: Slow / Non-responsive: Qt, Konsole, Xterm, Git

    Quote Originally Posted by tsu2 View Post
    Are you running git from the command line or using a graphical browser? Because otherwise they don't sound likely related.

    TSU
    I am running git from the command line. The more I troubleshoot this, the more I think it may be a problem with git specifically.

    I have not yet updated the fresh install of the system. Before I tried the fresh install, I also tried a system update. No luck with that. (Though I will still try a system update on the fresh system.)

    I also tried deleting my local .git folder and recreate from scratch. That is showing mixed results. If I try to add all the files at once, I get the hangup. But if I segregate it into smaller pieces, I get acceptable performance with reasonable response times.

    Here are some statistics for my repository:

    • Size: 183.6 MB
    • Folders: 548 sub-folders
    • Files: 25,110 files.


    I hadn't realized that this project grew so big. A good 23,000 of those files were the doxygen documentation. (I accidentally told doxygen to document the program, and all the included libraries.) I went through and reduced the size of the documentation. After deleting that documentation the repository reduced to:
    • Size: 27.9 MB
    • Folders: 189 sub-folders
    • Files: 909 files


    Git now works a little slow, but reasonable response times. That leads me to a whole new line of questions.
    1. Can I expect increasing performance problems as the git repository size increases?
    2. If I need to consider a hardware upgrade, what major hardware factors affect git performance? Read speeds of the NFS mount?
    3. Is there a practical upper limit to git repositories based on physical size or number of files?




    Now solved half of the problem, that leaves the other half. Why can't Qt run the programs in Konsole? Here is the source code to a very simple program I used to test this problem.

    main.cpp
    Code:
    #include <QCoreApplication>
    #include <vector>
    #include "testclass.h"
    #include <iostream>
    
    using namespace std;
    
    int main(int argc, char *argv[])
    {
        QCoreApplication a(argc, argv);
    
        //creat objects
        vector<int> testVect(5);
        testClass test1;
    
        for (unsigned int i = 0; i < testVect.size(); i++)
        {
            testVect[i] = i * i;
        }
    
        test1.setPoint(testVect);
    
        for (unsigned int i = 0; i < test1.getPoint().size(); i++)
        {
            cout << "i = " << i << " Class = " << test1.getPoint()[i];
        }
        
        return a.exec();
    }
    testclass.h
    Code:
    #ifndef TESTCLASS_H
    #define TESTCLASS_H
    #include <vector>
    
    using namespace std;
    
    class testClass
    {
    public:
        testClass();
    
        void setPoint(vector<int> &pointIn);
    
        vector<int> &getPoint();
    
    private:
        vector<int>* pPoint;
    };
    
    #endif // TESTCLASS_H
    testclass.cpp
    Code:
    #include "testclass.h"
    
    testClass::testClass()
    {
    }
    
    void testClass::setPoint(vector<int>& pointIn)
    {
        pPoint = &pointIn;
    }
    
    vector<int> &testClass::getPoint()
    {
        return *pPoint;
    }

  4. #4
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,308
    Blog Entries
    2

    Default Re: Slow / Non-responsive: Qt, Konsole, Xterm, Git

    1. Git
    I haven't seen any performance issues with git.
    Don't know if you're connecting to a commercial repo like github or gitorious or if you're connecting to a private repo (your own server). If the latter, then you need to consider everything. You may need to try to break down what might be slow, eg network, authentication and auth method (eg SSL or SSH)
    And, it's always important to update your system periodically. If your machine can't update, then something is likely wrong which may not be related to git. Inspect your syslogs.

    2. QT
    QT is a graphical environment, I doubt you should be trying to run any QT project <in> a console and might have mixed results launching from a console depending on dependencies and dbus use.
    So, without looking more closely at what your QT app is supposed to do, have you tried developing, compiling and testing from a QT IDE? There are many to choose from, eg
    Monkey Studio
    QT4 Designer
    QT Creator

    TSU

  5. #5

    Default Re: Slow / Non-responsive: Qt, Konsole, Xterm, Git

    Re: git, I noticed your top output showed: 19.8 wa - that's pretty high IO Wait percentage, and it's not clear what is causing the blocking IO behind that. Running iotop might shed more light. If you have consistently high IO Wait times, it could certainly affect git performance. If your still seeing hi IO Wait, I'd suggest investigating that.

    Also, you mention NFS. Is your git working directory on the NFS share? If so, since the repo is small, can you use a local file system instead?

    Lastly, when git is being unresponsive is it when your doing a local commit or when pushing?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •