Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^4: IO::Socket::INET performance on Linux

by flexvault (Monsignor)
on Nov 19, 2014 at 17:01 UTC ( [id://1107795]=note: print w/replies, xml ) Need Help??


in reply to Re^3: IO::Socket::INET performance on Linux
in thread IO::Socket::INET performance on Linux

BrowserUk,

    Sorry. Could you explain a little more about the difference(s) between "a single transfer" and "random sizes"?

I implemented the client routine as a function that I can 'require' at execution. Obviously the server runs all the time, and the client sends a command to the server and waits for a reply. Normally this reply is processed and the client exits. This is a single transfer or transaction. This works and I get near wire speed between the client and server.

Now, I have a test case that calls the client with different command sizes and tests that the server received the correct command by returned the exact data that was sent and comparing that they are the same. This runs until I stop the test case. This is where I get the 10Mbps. So it looks like the test case has a problem, but the funny thing is this doesn't happen when the client/server are on the same server. Note: I disabled the compare just in case, but it didn't change the 10Mbps.

I may be hitting some limitation with the Debian socket implementation, so as long as the 'single transfer' is correct, I'm okay. I've added a CRC to verify the data in addition to the size of the transfer. If either are incorrect, I ask for a re-transfer.

Best Regards...Ed

"Well done is better than well said." - Benjamin Franklin

  • Comment on Re^4: IO::Socket::INET performance on Linux

Replies are listed 'Best First'.
Re^5: IO::Socket::INET performance on Linux
by BrowserUk (Patriarch) on Nov 19, 2014 at 17:30 UTC
    Now, I have a test case that calls the client with different command sizes and tests that the server received the correct command by returned the exact data that was sent and comparing that they are the same. This runs until I stop the test case. This is where I get the 10Mbps. So it looks like the test case has a problem, but the funny thing is this doesn't happen when the client/server are on the same server.

    Do you make a new connection each time you send a new command?


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

      BrowserUk,

      Not in the test case!

      Regards...Ed

      "Well done is better than well said." - Benjamin Franklin

        Last guesses!

        1. What happens if you run your client on the server using the loopback address?
        2. What throughput do you see from using wget between the two machines?

          You'll need a http or ftp deamon running on one of the machines to try this.


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1107795]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2024-04-24 12:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found