For past couple of weeks, I have observed that whenever I boot-up the latest version of Skype, my Powerbook 15 starts to get warmer, and fan kicks in more often. Making Skype calls slowed down the whole machine, and for the longest time I could not figure out why. Well, accidentally, using the activity monitor explained why. During a course of a chat with Andy Abramson, I saw that Skype was taking up nearly 27% of the total CPU. In idle state it takes about 4% of the total CPU, versus Gizmo Project that consumes less than half-a-percent of CPU power. Anyone care to explain the technical reasons for this, and if Windows people experience the same CPU-hogging?
18 threads?! That’s part of the problem right there. Anyone who’s done any systems programming knows that you minimize your use of threads to the extent possible. Despite the fact that they are “lightweight”, they still suck resources, in many cases unnecessarily. Also, their implementations on different platforms can cause subtle bugs when you are using common code in different environments.
I can tell you that it’s taken nearly a year to get the threading right in my client. Yeah, I suck, but to optimize things like CPU usage in all situations just takes working things out over time.
Thanks. I was wondering the same. I have switched to Gizmo.
My immediate speculation would be that you are a becoming a “supernode” with great frequency:
http://www.corante.com/getreal/archives/2005/05/01/skype_be_afraid.php
note the URL above should have underscores between words – here’s tinyurl:
http://tinyurl.com/7cnl9
It has been discussed in this thread.
http://forum.skype.com/viewtopic.php?t=32439&start=30
I pulled the Macintosh beta off my powerbook after about a day of watching my machine slowdown. My son also pulled the Windows beta from his new Windows XP box because it was too buggy.
We communicate fine now with the last stable version of Skype.
Besides the possibility of your PC becoming a supernode there could be another reason for the CPU hog – Skype uses 256 bit AES encryption to encrypt the data stream.
I’m going on your record Om. Skype sucks period! They changed passwords on mine and others accounts and we can’t get into Skype. See the Skype forums. This is a MAJOR blunder on Skype’s. There is no telling how many customers they lost. And EBay paid how many billion for this sucking PIG!!
The real question is why are you using Grab? Screen capture functionality is built into the OS. Command-shift-3 for a normal shot, C-S-4 for a selection or add caps lock to the mix if you want just a window.
Om,
What version are you using?
I have no issues with the new Beta (December 1st) on my 17″ Powerbook.
Bastiaan
Hey !
Strange but for me it is Firefox which is sucking all my CPU ??? Anyway, I still like Firefox and keep on using it.
(and for encryption issues… there is no silver bullet… the stronger you want.. the more CPU it sucks… guess why the french government did not forbid the use of Gizmo 😉 )
Om, whatever happened to Ineen? I think you blogged about it some time ago: http://www.ineen.com
I removed Skype (latest stable release) for the third and final time from my WinXP system. I run 2GB of ram on this box (a P4-3.0) and Skype virtually dominated my system.
I’ve had enough of Skype taking my system down. Repeated spontanteous re-boots get real old, real fast.
ineen is nothing more than X-Lite’s client for OSX, except you’re going through their registrar ( wow, big surprise ! ).
Other services, like YAK for Free, and others, have been using this SIP client for ages.
Having developed the presentation layer for another SIP Client used inside an itty bitty machine company, I can back up part of what Frank was saying about the usage of threads. However, I think Jeff is closer to the truth.
Here’s a little breakdown as to “typical” ( and this is not to say that this is a breakdown of how my SIP Client is architected… )
threads purpose
———————–
1 Presentation-layer thread
1 registar thread, for communicating
with your TURN/STUN server so that
they know you’re there periodically.
2-per per conversation threads so that the
continuation of previous post…
per conversation threads so that the encode/decode of the audio streams can be performed separately, and kept in separate queues. There are a variety of ways that this can be performed, and I’m not necessarily advocating this design anyway.
If it WERE threads, the question would be, which threads are consuming what amount of CPU ? Is/Are it/they the presentation layer thread(s) ? Is it the codec threads for encoding/decoding the streams. Could there be nascently dormant threads created for things like video, etc. that are kept around ( it wouldn’t be the first time programmers kept resources around “for a rainy day” ) ?
This all leads to me wonder more about the threads themselves being used for Skype Supernode communication. THINK…..router. After all, when you don’t have things like STUN/TURN, you have to be able to pass around packets through SOMEBODY.
Gee, Om, I’m glad you’re so generous with your bandwidth. Thanks for routing !
Interesting threads discussion. My client has two threads, one for the GUI and one for everything else. The backend handles SIP, RTP, STUN, etc. All file descriptors are non-blocking and I use select() to poll them before accessing them anyway. All code that is run in this thread is designed to do things in small chunks. Classic polling loop design.
Here is link to your other article on increased bandwidth. If you have 30MB, are you going to care about someone using 64k?? Bandwidth is like money, you only notice your lack when it affects your ability to do the things you want to do.
On the CPU issue, it’s very difficult to say, but i would not be surprised if the video code was causing it, even if you’re not using video
Who even uses skype nowadays?
Sorry to be boring guys, but having been using Skype for over a year now – all the time – to other PCs and to phones, neither I nor any of the people I use it with have ever had any problems whatsover. The sound quality from PC-to-PC is superb – way better than phone (although from PC-to-phone there may occasionally be some delay), PC-to-overseas phone is so unbelievably cheap it may as well be free, and PC-to-PC IS free. Billing has always been extremely straightfoward and problem-free. Thumbs up for Skype here!
“Who even uses skype nowadays?”
What kind of comment is that? How many millions of people use Skype?
Your problem is your “computer” and the “OS” that you are using. Buy a real Windows computer like Dell or whatever and all your problems will be solved. See, programs like Skype need a computer to run properly – cannot run them on a Fisher-Price –my-first-computer-thing.
Hope this helps.
I’ve known about the “supernode” feature for a long while. Still, six days ago I installed Skype again because a friend wanted to use it with me. It has been running ever since, and this morning I noticed it was eating lots of CPU constantly (this on Windows 2003 Server.) The Internet, when used from other computers on the same connection, has been sluggish for these days, so in other words I became a supernode again. I want to use my computer and connection 100% trouble free, so I had to uninstall Skype again. Users who don’t have these problems must be either behind a NAT, or they use their computer in a way they don’t get these problems (turning off over night, IP changing.) I don’t want to firewall Skype myself because then my calls would just add the extra traffic on someone elses computer. I trust to real protocols like SIP and VoIP, which work just as well but require real configuration (opening a port) and they generally work cleanly. Also it is free to make client programs for those standardized protocols – with Skype it will be only the crap they provide. I am happy there still exists a real telephone network so that Skype is not like a world domination thing. 🙂
Well said Windi. Om I think the skype software architecture by itself is a very complicated one. One would wonder why would Skype go and have a MoU with Intel for providing more “CPU” only to its application, something that I feel very cheap about Skype. The latest version of Skype has something like 40 threads and with its memory usage being 100MB!!. I am behind a restricted NAT and no way my Skype could become a supernode. Also, it launches a “skypePM” which also eats up 20MB of memory along with 5-10 threads.
Bon dia!
I’ve been using Sk for years in a couple Macintoshs, and i am at least as happy as Dave about it. But since a few days I am trying to load it in a different Mac (cube) and it doesnt load, even after upgrading the OS from 3.7 to 3.9 (requirement for the new version, wich is also the only version I can find available for Macs).
So, any clue or help will be much appreaciated…
Ciao!