Details

    Description

      MyRocks is compiled without CRC32 command support. This negatively affects performance.

      It is compiled without CRC32 on all packages (including Windows, .deb packages, etc...)

      One can check this by starting the plugin and looking into $datadir/#rocksdb/LOG. It will have something like:

      Fast CRC32 supported: Not supported on x86
      

      Attachments

        Issue Links

          Activity

            psergei Sergei Petrunia added a comment - - edited

            It is not compiled in, because our build process does not define HAVE_SSE42, while rocksdb/util/crc32c.cc needs it to be defined:

            static bool isSSE42() {
            #ifndef HAVE_SSE42
              return false;
            #elif defined(__GNUC__) && defined(__x86_64__) && !defined(IOS_CROSS_COMPILE)
              uint32_t c_;
              __asm__("cpuid" : "=c"(c_) : "a"(1) : "ebx", "edx");
              return c_ & (1U << 20);  // copied from CpuId.h in Folly. Test SSE42
            #elif defined(_WIN64)
              int info[4];
              __cpuidex(info, 0x00000001, 0);
              return (info[2] & ((int)1 << 20)) != 0;
            #else
              return false;
            #endif
            }
            

            psergei Sergei Petrunia added a comment - - edited It is not compiled in, because our build process does not define HAVE_SSE42, while rocksdb/util/crc32c.cc needs it to be defined: static bool isSSE42() { #ifndef HAVE_SSE42 return false ; #elif defined(__GNUC__) && defined(__x86_64__) && !defined(IOS_CROSS_COMPILE) uint32_t c_; __asm__( "cpuid" : "=c" (c_) : "a" (1) : "ebx" , "edx" ); return c_ & (1U << 20); // copied from CpuId.h in Folly. Test SSE42 #elif defined(_WIN64) int info[4]; __cpuidex(info, 0x00000001, 0); return (info[2] & (( int )1 << 20)) != 0; #else return false ; #endif }

            Another thing that file has is:

            #ifdef HAVE_SSE42
            #include <nmmintrin.h>
            #include <wmmintrin.h>
            #endif
            

            These files are not present on a default Linux install, so at least for .deb packaging we will need to figure out which package has them, and put it to build-deps.

            psergei Sergei Petrunia added a comment - Another thing that file has is: #ifdef HAVE_SSE42 #include <nmmintrin.h> #include <wmmintrin.h> #endif These files are not present on a default Linux install, so at least for .deb packaging we will need to figure out which package has them, and put it to build-deps .

            People

              wlad Vladislav Vaintroub
              psergei Sergei Petrunia
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.