📜 ⬆️ ⬇️

Reduce CPU consumption Skype for Linux and Mac OS

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

I saw Vayun's comment once:
Perhaps the problem does not manifest itself in everyone, it's easy to check: we start Skype, we start top (on a laptop running on battery, the powertop will be more visual) and see how much it eats cpu.

I haven’t been busy for a long time, only press has been pressed down, increasing the timeout. This gives the greatest gain (by reducing the CPU% of Skype every 5), but probably it can be better.

Actually, here: Skype-poll-fix . Increases the timeout for calls to poll (Linux) and kevent (Mac OS), 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 environment variables MIN_POLL and SET_POLL. The timeout will be set to the SET_POLL value if the timeout that set Skype is less than MIN_POLL. By default, both values ​​are 300 ms.

Source: https://habr.com/ru/post/242043/


All Articles