Reduce Skype CPU Usage for Linux and Mac OS

    imageSkype How we love and hate him at the same time. For a long time, Skype was the only program that I tried to close when the laptop was running on battery power: it consumed about 4% of the CPU, woke up the processor 250-300 times per second, without doing anything, leaving the processor less time to be in a more energy-saving state.

    I once saw a comment by Vayun :
    Perhaps the problem does not appear to everyone, it’s easy to check: we launch Skype, run top (on a laptop running on battery powertop will be more visible) and see how much it eats up cpu.

    I didn’t bother for a long time, I only crushed poll, increasing the timeout. This gives the greatest gain (reducing the% CPU of Skype every 5 times), but probably better.

    Actually, here: Skype-poll-fix . Increases the timeout for poll (Linux) and kevent (Mac OS) calls, reducing processor consumption by 4-5 times.

    How to install


    For Linux:
    git clone https://github.com/ValdikSS/skype-poll-fix.git
    cd skype-poll-fix
    make
    LD_PRELOAD=./skype-poll-fix.so skype
    

    For Mac OS:
    git clone https://github.com/ValdikSS/skype-poll-fix.git
    cd skype-poll-fix
    make
    DYLD_INSERT_LIBRARIES=./skype-poll-fix.dylib /Applications/Skype.app/Contents/MacOS/Skype
    

    You can control timeouts through the environment variables MIN_POLL and SET_POLL. The timeout will be set to SET_POLL if the timeout that Skype set is less than MIN_POLL. By default, both values ​​are 300 ms.

    Also popular now: