Slow download on Mac and Linux using sockets

We have a need to download as much as possible for a couple seconds using sockets, and we have noticed that Adobes flash player on Mac and Linux are slower then Windows while we get good results on all tree OS using Goggles flash player in Chrome.
Our setup, client side, is a 1 Gbit/s internet connection throttle by a 100 Mbit/s switch. On the server side, we have an Apache web server (during testing) on a 1 Gbit/s internet connection.
For testing purposes, we download as much as possible of a 2 Gb big file for approximately 10 seconds. After we connect to the server, via a socket, we send an http request to start downloading the file. Using bytesAvailable, we get the number of bytes downloaded every half second, calculate the average speed for that half second and store that value in an array. After 20 times, we stop downloading and close the socket connection. Finally we calculate the average download speed of the 20 measurements.
All tests are preformed on version 11.6.602.180 except for Adobe Flash player on Ubuntu were the 11.2 r202 version. Adobe Flash player on Firefox 19.0.2 (other browsers were tested with similar results) and Google Flash player on Chrome 26.0.1410.43. Each OS/player was tested 5 times and presents the average.
Windows 7 Enterprise (64-bit) 
Mac OS X 10.6.8 (64 bit) 
Ubuntu 12.10 (64 bit) 
Adobe Flash player (NPSWF32_11_6_602_180.dll)
92.73 Mbit/s 
14.53 Mbit/s 
44.25 Mbit/s 
Google Flash player (pepflashplayer.dll)
91,89 Mbit/s 
89.46 Mbit/s 
91.57 Mbit/s 
doConnect();
function doConnect():void {
    socket = new Socket(url,port);
    socket.addEventListener(Event.CONNECT, connectHandler);
function connectHandler(event:Event):void {
    writeln("GET " + path + " HTTP/1.1");
    writeln("Host: " + url);
    writeln("Connection: close");
    writeln("");
    nStart = new Date().time;
    startTimer();
    socket.flush();
function writeln(str:String):void {
    str +=  "\n";
    socket.writeUTFBytes(str);
function startTimer(){
    startTime = new Date().time;
    var myTimer:Timer = new Timer(500,20);// 0.5 seconds 20 times
    myTimer.addEventListener(TimerEvent.TIMER, timeMeasurement);
    myTimer.addEventListener(TimerEvent.TIMER_COMPLETE, timeMeasurementComplete);
    myTimer.start();
function timeMeasurement():void {
    receivedData = socket.bytesAvailable;
    var varJunk:ByteArray = new ByteArray();
    while (socket.bytesAvailable > 4){
        socket.readBytes(varJunk);
    var split:Number = new Date().time - startTime;
    var speed:Number = receivedData * 8 / ((new Date().time - startTime) / 1000);
    startTime = new Date().time;
    downloadList.push(speed);
    receivedData = 0;
function timeMeasurementComplete():void{
    var len:int = downloadList.length;
    var sum:Number = 0;
    for (var i:int = 0; i < len ; i++) {
        sum +=  downloadList[i];
    downloadResult = sum / len;
    socket.removeEventListener(Event.CONNECT, connectHandler);
    if(socket.connected){
        socket.close();
In further investigation we built an easy Flash based latency meter. We download a small txt-file, measuring the time between just before we send http-request and until we receive a response from the web server.
We have the setup as for the speed tests, but we do this 5 * 20 times with each OS/player.
Windows 7 Enterprise (64-bit) 
Mac OS X 10.6.8 (64 bit) 
Ubuntu 12.10 (64 bit) 
Adobe Flash player 
4.30 ms 
66.67 ms 
10.49 ms 
Google Flash player 
4.25 ms 
4.28 ms 
4.19 ms 
doConnect();
private function doConnect():void{
    socket = new Socket(url,port);
    socket.addEventListener(Event.CONNECT, connectHandler);
    socket.addEventListener(ProgressEvent.SOCKET_DATA, socketDataHandler);
private function connectHandler(event:Event):void{
    writeln("GET " + path + " HTTP/1.1");
    writeln("Host: " + url);
    socket.flush();
    nStart = new Date().time;
private function writeln(str:String):void{
    str +=  "\n";
    socket.writeUTFBytes(str);
private function socketDataHandler(event:ProgressEvent):void{
    var latecy:Number = new Date().time - nStart; // latency in ms
Using a packet analyzer (Wireshark) on the OS X/Adobe player, the time from http-request is sent to data is received is approximately 2 ms. An ack is sent less then 0.04 ms after the packet is received. Using the socketData event to send a new http-request, just after we measure the time for the last package, can see event created delays. We have a delay between 64 and 67 ms compare that to OS X/Google player with between 1 and 3 ms delay.
Note: When playing around a timer, that fired a number of times during parts of a large number of latency measurements, we notice that measurements when the timer was running were better. Testing having a empty timer firing as fast as possible constantly during both download and latency measurements we got significantly better results on OS X/Adobe player, although not good. Average download 31,82 Mbit/s and average latency 16,59 ms.

Bumping this topic again as it's still sort of bugging me, but the problem has been isolated to a few certain sites. On some i get the maximum speed and on others i get snailspeed. One of the slow ones unfortunately is basically anything that has to do with Apple....So all Quicktime movie trailers, iTunes stuff, movies etc are slow, except podcasts that are German. I'm downloading the 30 day trial of iWork and i'm getting whopping 19,2KB/s, when i should be getting about 1300KB/s. You can just imagine the frustration:/
I'm just wondering am i alone on this or is anybody else excperienceing similar? And as usual, on windows i'm getting full speed all the time, anywhere, grrrr....!
-CC

Similar Messages

  • I am working with two computers in my profession (Mac/PC). I want to download testversions, lets say Premiere Elements 13, for Mac and PC using my adobe login. Is this possible?

    I am working with two computers in my profession (Mac/PC). I want to download testversions, lets say Premiere Elements 13, for Mac and PC using my adobe login. Is this possible?

    Sure. Elements is cross-platform, anyway.
    Mylenium

  • Can I install Linux for Windows on my Apple Mac and afterwards use old windows programs as PageMaker on my new Mac. If yes where can I find Linus windows for Mac

    Can I install Linux for Windows at my new Mac and afterwards use old Windows programs as Photo Shop and PageMaker on my Mac? If yes where at the Internet can I find Linux for Mac and Windows?

    What is your definition of a "Linux for Windows" ?
    There is Linux like Ubuntu which can be installed on a Mac
    See the UbuntuForuns here https://wiki.ubuntu.com/MactelSupportTeam
    And there is Microsoft Windows which can be installed and used on a Mac with Apples BootCamp http://www.apple.com/support/bootcamp/ or through Virtualization apps like Parallels, VMWare Fusion or VirtualBox.
    Windows Programs don't run in a Linux only in Windows.
    Stefan

  • How do Mac and Linux find the JFX runtime?

    I've been searching the documentation without success for the answer to what ought to be a simple question -- how do I point Mac or Linux at the 2.2 runtime? It's no problem if I'm running in an IDE (NetBeans, e(fx)clipse), where I can tell the IDE where I unpacked the SDK. But what if I want to run a jar file, such as produced by the ant tasks?
    You'd think this would work (on Linux, where I unpacked the SDK into /opt):
    java -cp /opt/javafx-sdk2.2.0-beta/rt/lib/jfxrt.jar:. -jar MyProgram.jar But it doesn't -- I get a popup saying "This application requires a newer version of the Java runtime. Please download and install the latest Java runtime from java.com. Then restart the application" (I'm running with 1.7.0_05-b05 from Oracle).
    The only thing at all close I find in the Linux installation instructions is it says to unpack the samples as a subdirectory of the SDK, wherever I happened to put it, and then I should be able to run the examples with a simple "java -jar filename.jar". But even that's not quite true -- it only works if I first cd to the samples directory. But it's a start, so I tried...
    cd /opt/javafx-sdk2.2.0-beta/rt
    java -jar ~/dist/MyProgram.jarThat succeeds in finding the runtime, but my program doesn't work, because it doesn't find my dependent libraries. So I tweaked the command a little bit:
    cd /opt/javafx-sdk2.2.0-beta/rt
    java -cp ~/dist/MyProgram.jar -jar ~/dist/MyProgram.jarThat actually works. But it can't possibly be the right answer -- you shouldn't have to run a javafx program with the runtime directory as your working directory.
    And even that doesn't work on Mac. There, Java knows how to find the runtime that's installed with JDK 7 update 5 for Mac. But if I want to test a program with the 2.2 runtime, what do I do? Setting -classpath on the command line still uses the 2.1 runtime. And if I try the trick of connecting to javafx-sdk2.2.0-beta/rt first, it doesn't work at all -- it doesn't find my libraries, and it throws up a "java quit unexpectedly" window after getting a segfault.
    So what's a developer to do? Am I supposed to use the native packaging procedure instead?

    JavaFX 2.2 is first version where Linux/Mac are supported as runtime (and not just SDK).
    However, you need to install JavaFX Runtime that is part of JRE 7u6 (you can get beta from jdk7.java.net or wait for FCS version of it).
    Installing JRE is the only way to get JavaFX runtime installed on Mac and Linux (and eventually on Windows too).
    rt folder in the SDK is "private" copy of the runtime. It is not supposed to be used to run arbitrary JavaFX applications by default.
    You can still force to use it as
    java -Djavafx.runtime.path=/opt/javafx-sdk2.2.0-beta/rt/lib/jfxrt.jar -jar MyProgram.jar
    or
    java -cp ~/dist/MyProgram.jar:/opt/javafx-sdk2.2.0-beta/rt/lib/jfxrt.jar com.javafx.main.Main
    Note that if you use "-jar" then "-cp" is ignored by java launcher. This is not JavaFX specific behavior.
    JavaFX specific part is that properly packaged JavaFX main jar file will include copy of launcher class (com.javafx.main.Main)
    and this is what will be run when you double click on jar or use "java -jar". Launcher will try to locate JavaFX runtime to use,
    it knows how to find runtime in the SDK if it is sample located in the SDK itself and it also knows how to find installed version of runtime.
    If JavaFX is not found then it will show you message you observed.

  • How do I download the Mac App Store using OS X 10.5.8

    how do I download the Mac App Store using OS X 10.5.8

    Well, you can cancel your Snow Leopard order if it hasn't already shipped. You need not wait on it as you can download Mountain Lion now that you have a redemption coupon (I assume that's what you meant by the email.)
    After Mountain Lion is installed you can download a free copy of Mavericks. This all assumes that your computer meets the requirements for Mountain Lion.
    Before you do any upgrade I strongly urge you to do this:
    Repair the Hard Drive and Permissions
    Boot from your Snow Leopard Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.
    If DU reports errors it cannot fix, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
    Personally, I would erase the hard drive then install the new OS X version. First, make a backup of your files from which you can later restore.

  • Applet colors for Mac and Linux?!

    I've got an applet where I use Color(int, int, int) to set background colors of components. Running the applet on Windows in Netscape or Explorer gives the expected colors. But in Mac and Linux the backgrounds are only white (using Netscape or Explorer).
    Does anybody know why, and how I could set colors to be shown also for Mac and Linux?
    /Johan

    I doesn't seem to help using predefined colors, like 'red', 'blue', etc...

  • Font Issues on PC, MAC and LINUX

    Hey all,
    I have a software Applet that is designed to run on PC, MAC and LINUX. I am having troubles with the options dialogs and text areas that have strict size constraints. The font I use on PC to make the text fit into the space alloted to a JRadioButton (i.e.) in my menu doesn't seem to work on the MAC nor Linux. I am trying to figure out how to solve this problem. When it was just MAC and PC I simply made my fields a bit wider but with Linux involved now I want to develop a more robust solution. In theory I should find a font that is common to all 3 correct? Just wondering what should happen. Advice and input is much appreciated!
    Rob

    If the size of the component is critical, then you can over-ride the component's paint method (e.g. in a subclass) to scale the component's font to fit the component. I would only do this once, otherwise you'd be repeating the operation on every paint - use a "fontScaled" instance variable, for example.

  • I just got my Mac and I used my family Apple ID. It had all of my parent's information, I added my e-mail.I wanted to make my own Apple ID, but I couldn't use the same e-mail address again! How do I delete this information so I can make my own Apple ID?

    I just got my Mac and I used my family Apple ID. It had all of my parent's information, I added my e-mail.I wanted to make my own Apple ID, but I couldn't use the same e-mail address again! How do I delete this information so I can make my own Apple ID?

    Wendy P-G wrote:
    I just got my Mac and I used my family Apple ID. It had all of my parent's information, I added my e-mail.
    It is not clear how or where you "added" your email, but you cannot create an Apple ID using an email address that is already associated with another Apple ID.
    If that is what you did, delete that email address from your family's Apple ID. You should be free to create a new one.
    Do all that by starting here: https://appleid.apple.com/
    Select "Manage your Apple ID". Log in with your family's Apple ID and then delete your own email address wherever it appears.
    Save Changes, log out, and create the new one using the same website. This time select "Create an Apple ID".
    Please don't forget your security questions, and be sure to specify a "rescue email address" that is separate from all other Apple IDs. You will avoid so many problems that way...

  • Creating network between Mac and Linux

    Hello guys! I need to set up network between my iMac and Ubuntu linux. iMac is connected in internet by Airport and Fon Wifi Router witch is connected in router which is connected to adsl -modem. My pc is connected directly to router. Both computers have access to internet. Is there any easy solutions to share files with mac and linux? I don't need any webservers etc, I just want to share files.
    Other question related to this, why is my mac's ip address like 192.168... and linux ip addrress is 84.250...?
    Thanks allready!

    Though I'm not newbie with computers, I'm really confused becouse I haven't set up network like this never before.
    Not a problem, no worry... we all know something somebody else doesn't and vice versa.
    My linux says that my DHCP -IP is 193.210.18.18, is that related to this in any way?
    Yes, if the Mac had an IP of 193.210.18.x, (but not 18 for x), then connection would be simple, but I think we must have two devices passing out IPs. What is the Mac's IP again?
    http://www.helpdesk.umd.edu/topics/communication/ethernet/office/winxp/2882/
    Do you have any advice where I could start looking from the right IP of my linux?
    http://www.webmasterforums.com/networks-clusters/1804-find-ip-address-my-linux-b ox.html
    I'm not sure if its even configurable.
    http://tinyurl.com/2gug9s

  • Communication between Windows 7 and Windows 8(and above) using Sockets(TCP and UDP)

    I need to use TCP and UDP using Sockets to communicate between two(or more) applications installed in Windows 7 and Windows 8.
    Is it possible.? I tried within a LAN, but in vain. If needed I would post the appropriate code.
    Note: I only tried running exe(s) in these machines and not with installation.

    Hello Prabodh.Minz,
    >>Is it possible.?
    It is not clear what develop language you are using, here are examples which uses the C# based on .NET. It created the communition between two machines by using sockets with TCP protocol, a server and a client:
    Synchronous example:
    Client and
    Server.
    Asynchronous example:
    Client and
    Server.
    Multi-client per one server - socket programming in .net(C#)
    >>Note: I only tried running exe(s) in these machines and not with installation.
    There are all .exe.
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Mac and Linux executables

    Hi,
    I want to turn my Jar file in to a Mac and Linux executable. For windows I found a lot of programs which can do that, like Lauch4J and JSmooth. I would like to know if there are programs like that for Linux and Mac.

    Hi Shnoogins
    Nope, that's one of the changes you see between version 2 and
    3. There is now only a single .EXE option. And Mac isn't it!
    Cheers... Rick

  • Is it possible to attach a bluetooth speaker to my mac and still use the mac's speakers at the same time?

    Is it possible to attach a bluetooth speaker to my mac and still use the mac's speakers at the same time, so I can have music in two rooms (from the mac in the lounge and the  bluetooth speaker in the kitchen? It seems to be a choice of either/or as when I pair my speaker the sound stops from the mac's speakers. 

    No.

  • Since the IOS 5 update my iPad seems to run a lot slower connecting to websites and general use? Can anyone help?

    Since the IOS 5 update my iPad seems to run a lot slower connecting to websites and general use? Can anyone help?

    Digging a little deeper on here, and I've Cleared the Safari cache, and rebooted , so i'll see if it is any better!!!!!

  • I just got a Mac and I use the same internet connection as my mom and my brother, who has an iPad. He can click on something that has my name and then Macbook Air, and is able to see everything on my computer screen. How do I fix this?

    I just got a Mac and I use the same internet connection as my mom and my brother, who has an iPad. He can click on something that has my name and then Macbook Air, and is able to see everything on my computer screen. How do I fix this so he cant see what i am doing on my computer?

    No, I made sure nothing was checked for that section when i found out he could see my screen. At the top it says "computers on your local network can access your computer at: blah blah". I think thats how hes doing it but i dont know how to fix it.

  • Simple network: Windows 7 file server & several Macs and Linux machines- SAMBA bombing out?

    Hi guys, i know this is really more of a windows support question, but here goes:
    Windows 7 Ultimate 64bit acting as a file server, turned off all the usual MS authentication stuff so Macs and Linux systems connect with password without issues..
    except when i start copying certain files/file types/names to the system, it will break the network connection, then refuse any more connections, all macs and linux machines on the network are booted, from the PC however i can still access the Macs shares volumes.. (the macs still see the windows machine & pinging is still there, but if i try to connect i get 'check the name/ip address' error
    im no expert, but its as if the Samba service on the windows machine gets killed and im not sure what to do to get it to re-connect other then restarting the system, but as the system is also a terminal server users always have apps/documents open and its 'never a good time' to do it..
    if there was an alternate Samba to install, or a buffer patch, or even a 'goto this service, stop and restart' etc.
    Trying to get help from the 'windows' community comes down to 'well your on a mac what do expect etc etc' *sigh*
    any help is appreciated
    Richard

    Hi, just thought id update my finding regarding this, and it maybe directly affected by my only system, but in case anyone else has this issue?
    I thought it may be due to the file name thats causing the lockups, but I found while trying to backup my collection of install images and updates that sure enough a simple named file 'osx10.6.3.DMG' going to the server, 850MB in it stalls and fails, now im not able to connect.
    but form the PC, without changing the name or location etc, i copied the SAME from the Macs hard drive through to the windows system, all 5.7GB.
    so it is something to do with my windows 7 system, but maybe more related to the size of the file then the name or non-standard characters as first thought.
    as suggested by Grant above i will check on the server boards as well.
    thanks

Maybe you are looking for

  • How do i create a web page on my mac

    I am wanting to create a web site on my computer.  I heard it is so easy on a mac!  I can't find the app needed for this.  Can anyone help me.  I am very new to the mac world so any advice will be greatly appreciated.

  • Posting period closing

    Hi Gurus, Can any one tell me is it neccessary to close the posting period every month. Can i have th posting period for my client open for one full year. which means open and close the posting period only once a year, rather than opening and closing

  • Safari and firefox 'cannot find the server' for every other page that i navigate to, unless I turn Wifi off and on. How do I fix this?

    Safari and firefox 'cannot find the server' for every other page that i navigate to, unless I turn Wifi off and on. Once i reconnect to the network, the page loads, but after loading a few more pages, the same thing happens all over again. This happe

  • Is there a way to shut off the "Show All" in a panelCollection?

    JDev 11.1.1.4.0 Hi, I am looking for a way to turn off the "Show All" option in the View/Columns menu. Even though you can hide columns from this menu using featuresOff="columnsMenuItem:col1,col20" if a user selects the "Show All" option, it will sho

  • Strange storage problem...  hidden files?

    Hi all... I am using a new G4 PB 1.67GHz, 1Gb RAM, 75Gb HD. Connected to the firewire port is a Rocstor 300Gb drive. Conected to the 2nd firewire port on the external drive (the computer only has 1 FW port) is my Canon Optura 60. I have been importin