Anyone know how skype works?

Discussion in 'Mac Apps and Mac App Store' started by dogbone, May 9, 2006.

  1. dogbone macrumors 68020

    dogbone

    Joined:
    Sep 16, 2005
    Location:
    S33.687308617200465 E150.31341791152954
    #1
    I'm really confused about the speed that files tranfer through skype. For example I was sending some files to the States that were leaving at 2kbytes per second. My download/upload speed on a 512/128 ADSL should be in the real world 50kb/12kb per/sec

    BUT, I was just testing it with another comuter in the next room to see if it was just as slow but it instead of sendind the file at my maximum upload speed of 12kb/sec it started sending it at my maximum download speed of 50kb/sec, and it kept increasing as the file went on. By 18 seconds the file was leaving my computer at 600kb/sec which is 10 times my download connection speed.

    How can this be possible. The computers are on an ethernet network but if it is sent through skype it won't be going through the ethernet would it?
     
  2. mrichmon macrumors 6502a

    Joined:
    Jun 17, 2003
    #2
    The Skype servers are only used as an index to the machines currently conencted to Skype. Once a call or a file transfer has been established the Skype servers are not invokved.

    In your example the process goes like this:

    1. Machine A connects to skype and registers its IP with the skype servers.
    2. Machine B connects to skype and registers its IP with the skype servers.
    3. Machine A sends a message to skype to set up a connection to Machine B.
    4. Various messages are passed between Machine A, Machine B and the Skype servers. The outcome of these messages is that Machine A and Machine B establish a direct connection.
    5. The file is transfered directly from Machine A to Machine B.

    This is a rough overview based on how this sort of service is generally implemented and based on some high level overviews of the skype protocol that I've skimmed.

    The data connection would be going over ethernet between the two computers. But ethernet is probably running at 100Mb/s in your house.
     
  3. dogbone thread starter macrumors 68020

    dogbone

    Joined:
    Sep 16, 2005
    Location:
    S33.687308617200465 E150.31341791152954
    #3
    Thanks for that explanation, so let me get this clear, if I were to send a file to a computer that is only on the net, then skype would make them talk through their internet connection but if a computer is on a network then skype somehow works out they are on a network and sets up the connection on the network rather than the interent?

    Is it skype or the computers themselves that decide how they will communicate, network or internet? I mean if I send an ordinary emailed file to a networked computer it goes via the internet and not via the ethernet. So it seems that skype somehow knows they are networked?
     
  4. Oryan macrumors 6502a

    Oryan

    Joined:
    Apr 1, 2005
    Location:
    Lincoln, NE
    #4
    It is probably more likely that Skype sends machine A the IP address for machine B. Machine A then recognizes that machine B has a similar IP address. Either that or machine A just sends the file to that IP address and lets the routers figure out where machine B is. The closer it is, generally the faster the file will transfer.
     
  5. mrichmon macrumors 6502a

    Joined:
    Jun 17, 2003
    #5
    I think you have that right but your use of network terms is a little unusual. Skype establishes a direct connection between the computers at each end of the file transfer (or phone call). The Skype servers are mainly just a central place for computers to find other computers to connect to.

    In the case where both computers are on a local network then the data transfer will never leave the local network since there is no need to send the data out onto the Internet. In the case where the transfer is to a computer on the other side of the country then the direct network connection will go over the Internet.

    Local Network = your router and the computers directly connected to it via ethernet or wireless.
    Internet = everything on the other side of your DSL or Cable modem.

    There is no difference as far as your computers are concerned between connecting to a computer on the same network and connecting to a computer on the other side of the planet. Every computer on a network (local network or internet) has an IP address. A computer just knows how to contact another IP address.

    The Skype servers and the set of messages the Skype servers exchange between the two machines is what helps share out the IP addresses for the computers involved in the transfer.

    With an email message, the message is sent to your mail server at your ISP. The ISP mail server then establishes a connection to the mail server for the recipient of the message. When the recipient checks their mail the message is downloaded from the recipients email server to their computer. So, with email your computer does not establish a direct connection to the recipients computer... your computer just talks to your ISPs mail server. But the connection between the sending ISP mail server and the receiving ISP mail server is a direct connection.
     
  6. dogbone thread starter macrumors 68020

    dogbone

    Joined:
    Sep 16, 2005
    Location:
    S33.687308617200465 E150.31341791152954
    #6
    Ah OK that's clear.

    So then if skype is only sending out a file at 1/10 speed it should then that is a problem with my ISP.

    What I don't understand is that I can do an upload test and get a readout of 100kbits/sec but skype sends it out at 1.3kbytes per/second instead of 12kb/sec which is what I'd expect.

    I phoned my ISP tech department and they say there is no restrictions that the put on skype, this is why I thought that skype might be behind this but it appears from what you say that it must be the ISP, which is bigpond.com who I wouldn't trust as far as I could throw them.
     
  7. mrichmon macrumors 6502a

    Joined:
    Jun 17, 2003
    #7
    Be careful here. You are mixing measurements of kilobits per second together with kilobytes per second.

    Kb/s = kilobits per second.
    KB/s = kilobytes per second.

    8 kilobits per second = 1 kilobyte per second.

    So first check the units that are being used in the various measurements. Also, you need to remember that there is some over head for protocol messages that will detract from your maximum rate.

    Plus, each packet sent in a file transfer must be acknowledged as being received at the destination end. If a packet is not acknowledged quickly enough then this will effectively slow down a transfer since unacknowledged packets get resent until they are received correctly.
     
  8. dogbone thread starter macrumors 68020

    dogbone

    Joined:
    Sep 16, 2005
    Location:
    S33.687308617200465 E150.31341791152954
    #8
    Yes I'm aware of all that except for the 'acknowleding packets' bit I didn't realise that.

    I'm on a 512/128 connection that's in bits per second which I translate into 64kbyte/sec upload and 16kbtes/sec download.

    My actual figures are 50/12 kbytes per second on a good day.

    So I'd expect skype to send a file at a maximum of 12 kilobytes per second. I'd be happy with 8 but 1.3 seems to suggest there is something seriously wrong somewhere. Surely the acknowledging packets thing couldn't slow it down that much?
     
  9. mrichmon macrumors 6502a

    Joined:
    Jun 17, 2003
    #9
    But how fast is the connection between the receiving computer and the internet? Your end of the connection is not the only part of the transfer.
     
  10. dogbone thread starter macrumors 68020

    dogbone

    Joined:
    Sep 16, 2005
    Location:
    S33.687308617200465 E150.31341791152954
    #10
    Not being in the robber-barron part of the world like australia they were on a 10mbit connection. I'm going to try to set up some tests soon. I always assumed the my ISP was limiting the upload band with the p2p but they tell me they aren't. Now I'm trying to get to the bottom of this.
     
  11. demallien macrumors regular

    Joined:
    Oct 13, 2005
    #11
    I've noticed the same problem when trying to transfer files to my parents in Australia on Skype. I only use Skype with them, so I had just assumed that it was a limitation of Skype that the transfer was slow.

    That said, knowing how Skype works, the slowness of the connection still surprises me. It's almost like Skype deliberately throttles back the rate at which it sends files. But if you're telling me that a transfer of files between two computers that are next to each other is rapid, I guess that's not true either.

    Tricky, tricky, tricky....

    Has anyone tried packet-sniffing a Skype connection to see if Skype uses a separate TCP connection for data?
     
  12. dogbone thread starter macrumors 68020

    dogbone

    Joined:
    Sep 16, 2005
    Location:
    S33.687308617200465 E150.31341791152954
    #12
    As far as I understand things so far, the connection has nothing to do with skype once it puts the two computers in touch.
     
  13. mrichmon macrumors 6502a

    Joined:
    Jun 17, 2003
    #13
    Most likely there is a slow or saturated link somewhere between you and the receiving computer. The US/Australia link used to be constantly close to capacity and thus the limiting factor about 10 years ago. I'm not sure what the status is now that I've moved to the US.

    But the slowness of the US/Australia link prompted me to refer to the "information super-goat trail" on more than one occassion. :)
     

Share This Page