Uploaded image for project: 'Erlang/OTP'
  1. Erlang/OTP
  2. ERL-1343

Dist becomes much slower when sending complex terms

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: OTP 23.0.3
    • Fix Version/s: OTP-23.1.2
    • Component/s: kernel
    • Labels:
      None

      Description

      There is significant throughput difference between sending the following two messages through dist:

      1. [crypto:strong_rand_bytes(128) || _ <- lists:seq(1, 1 bsl 10)]

      2. term_to_binary([crypto:strong_rand_bytes(128) || _ <- lists:seq(1, 1 bsl 10)])

      (2) is much faster

      Reproduce:

      erlc test.erl

      On terminal 1:

      erl -setcookie test -name 1@127.0.0.1 -s test server -noinput

      On terminal 2:

      erl -setcookie test -name 2@127.0.0.1 -s test client binary -noinput

      Result: 861.9077 MB/s

      Again on terminal 2:

      erl -setcookie test -name 2@127.0.0.1 -s test client list -noinput

      Result: 131.8675 MB/s

      Remark

      It is much better in OTP 22.3.2,

      erl -setcookie test -name 2@127.0.0.1 -s test client binary -noinput
      823.7916 MB/s

      erl -setcookie test -name 2@127.0.0.1 -s test client list -noinput
      418.5475 MB/s

       

        Attachments

        1. perf-kernel.svg
          160 kB
        2. test.erl
          0.9 kB

          Activity

            People

            Assignee:
            rickard Rickard Green
            Reporter:
            zzydxm zzydxm
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: