Professional Web Applications Themes

Bad performance on local TCP connections - Sun Solaris

I have a simple 'server' program, which does select()/recv()/send() in a loop. On the other side I have a simple client program which does send()/recv() in a loop. The request size is about 100 bytes/request. The performance of this program is about 30000 requests/second on a Linux system and only 3500 requests/second on a Solaris 8 system. vmstat reports that the system is 50% idle. I tried TCP_NODELAY, but there was no change. The test program is rather small. If you want to have a look on it, I'll send it to you. What can I do to improve the ...

  1. #1

    Default Bad performance on local TCP connections

    I have a simple 'server' program, which does select()/recv()/send() in
    a loop.
    On the other side I have a simple client program which does
    send()/recv() in a loop. The request size is about 100 bytes/request.

    The performance of this program is about 30000 requests/second on a
    Linux system and only 3500 requests/second on a Solaris 8 system.
    vmstat reports that the system is 50% idle.

    I tried TCP_NODELAY, but there was no change.
    The test program is rather small.
    If you want to have a look on it, I'll send it to you.

    What can I do to improve the performance, is there a system parameter
    or a flag I have to set ?

    Best regards and thanks,
    Josef
    Josef Guest

  2. #2

    Default Re: Bad performance on local TCP connections

    fujitsu.com (Josef Kammerloher) writes in comp.unix.solaris:
    |I have a simple 'server' program, which does select()/recv()/send() in
    |a loop.
    |On the other side I have a simple client program which does
    |send()/recv() in a loop. The request size is about 100 bytes/request.
    |
    |The performance of this program is about 30000 requests/second on a
    |Linux system and only 3500 requests/second on a Solaris 8 system.

    You might try converting your code to use poll(), or even better if your
    fd list does not change often, /dev/poll. select() is just a somewhat
    sizable wrapper around poll() which has to translate all the arguments
    from select fdmasks to poll linked lists. See the article at
    http://developers.sun.com/solaris/articles/polling_efficient.html
    for details.

    --
    __________________________________________________ ______________________
    Alan Coopersmith calberkeley.org
    http://www.CSUA.Berkeley.EDU/~alanc/ aka: COM
    Working for, but definitely not speaking for, Sun Microsystems, Inc.
    Alan Guest

  3. #3

    Default Re: Bad performance on local TCP connections

    Josef Kammerloher <fujitsu.com> wrote: 
     

    50% Idle is consistent with a single-request, synchronous,
    request/response applcation running on a UP system over a
    non-bottleneck network link to similar system. Or, on an 2P system
    where the path lengths are quite long.

    You might look at what the netperf TCP_RR perf happens to be, just to
    show/disprove that the use of select (event notification) is not at
    issue.

    rick jones
    --
    firebug n, the idiot who tosses a lit cigarette out his car window
    these opinions are mine, all mine; HP might not want them anyway... :)
    feel free to post, OR email to raj in cup.hp.com but NOT BOTH...
    Rick Guest

Similar Threads

  1. CFMX7 and Local SQL Server Connections
    By jjay@aus in forum Coldfusion Server Administration
    Replies: 9
    Last Post: March 31st, 06:59 PM
  2. mysql performance issues too many connections
    By marcfischman@gmail.com in forum MySQL
    Replies: 2
    Last Post: September 7th, 07:43 PM
  3. connections to demo site on local PC
    By jan malcolm in forum Macromedia Contribute Connection Administrtion
    Replies: 0
    Last Post: November 5th, 02:12 PM
  4. script disable/enable local area connections
    By Tony in forum Windows Networking
    Replies: 1
    Last Post: July 13th, 03:58 PM
  5. Setting vsftpd to only allow local connections...
    By Kenneth A Kauffman in forum Linux Setup, Configuration & Administration
    Replies: 0
    Last Post: June 26th, 06:27 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139