Announcement

Collapse
No announcement yet.

Linux 5.7 Netfilter To See AVX2 Optimizations For Big Performance Boost - Can Be Up To ~420%

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    Originally posted by tiennou View Post

    A look at the commit (https://git.kernel.org/pub/scm/linux...94d765c8eecbe1) points in that direction.
    This BTFO all people says: "but muhhh, the compiler knows how to optimize assembly code better than you do it manually."

    Comment


    • #12
      Originally posted by Mario Junior View Post

      This BTFO all people says: "but muhhh, the compiler knows how to optimize assembly code better than you do it manually."
      To be fair, the best solution is sort of a middle-ground: compiler intrinsics.

      The "either use the fast path or fail to compile" of explicitly calling SIMD instructions directly, but without the "compiler has no idea what optimizations are safe to perform on the data flow surrounding this instruction" of assembly.

      That's why Microsoft decided to omit inline assembly support from Visual C++ for 64-bit targets.

      Comment


      • #13
        Originally posted by cl333r View Post
        To me as a desktop user this is just gibberish, as about all of the "news" on lxer and linuxtoday.
        Originally posted by Setif View Post
        I hope It's not about some operations that occur once or twice a day, changed from taking 4.2 ms to 1.0 ms (420%).
        Everything passing through the network stack goes via netfilter. So if you have a firewall, you have some routing roules, iptables, ebtables etc will benefit greatly.

        For enterprise, running docker containers, having lots of firewall rules, DMZ, network isolation etc this performance is godsend. It is crazy how much time the CPU spends trying to pass a single packet via the various netfilter chains, mangling, prerouting, postrouting etc.

        Comment


        • #14
          Doesn't executing AVX2 instructions consume a lot of power? If the processing time decreases, it's logical that the total consumed energy for the process to decrease, at the expense of higher peak/intantaneous power consumption, but has anyone tested it?

          Comment


          • #15
            Originally posted by Raka555 View Post
            I assume it is hand optimized assembler ?
            All SIMD programming, is done using either assembler or compiler intrinsics, which are basically C style instructions that convert 1-1 to assembler.

            By definition SIMD is hand optimized, unless of course you rely on compiler optimizations.,

            Comment


            • #16
              Originally posted by Mario Junior View Post

              This BTFO all people says: "but muhhh, the compiler knows how to optimize assembly code better than you do it manually."
              There's obviously going to be cases where hand-optimized assembler is going to be faster. The problem is that it's less readable, harder to understand, much more verbose, and far less portable than C in general. And it *does*, in the vast majority of situations, generate better assembly than you could write by hand.

              Comment


              • #17
                Originally posted by newwen View Post
                Doesn't executing AVX2 instructions consume a lot of power? If the processing time decreases, it's logical that the total consumed energy for the process to decrease, at the expense of higher peak/intantaneous power consumption, but has anyone tested it?
                It does, but when you're looking at 0-30% more power for 30-420% better throughput, it's still more efficient overall.

                Comment

                Working...
                X