Class Hardware

  • All Implemented Interfaces:
    java.lang.Comparable<Hardware>

    public final class Hardware
    extends CommonMachine
    implements java.lang.Comparable<Hardware>
    • The first element in the array should correspond to total system resources; the total amount of RAM and the total number of threads (Typically the same as what is returned by Runtime.availableProcessors()).
    • The last element in the array should describe the L1 cache. Typically Intel processors have 32k L1 cache and AMD 64k. 1 or maybe 2 threads use/share this cache.
    • Caches, all levels except L1, are described between the first and last elements in descending order (L3 cache comes before L2 cache). Specify the size of the cache and the number of threads using/sharing the cache. (Do not worry about how many cache units there are - describe one unit.)
    • The array must have at least 2 elements. You must describe the total system resources and the L1 cache. It is strongly recommended to also describe the L2 cache. The L3 cache, if it exists, is less important to describe. The derived attributes processors, cores and units may be incorrectly calculated if you fail to specify the caches. Known issue: If you have more than one processor, nut no L3 cache; the processors attribute will be incorrectly set 1. A workaround that currently works is to define an L3 cache anyway and set the memory/size of that cache to 0bytes. This Workaround may stop working in the future.
    • new MemoryThreads[] { SYSTEM, L3, L2, L1 } or new MemoryThreads[] { SYSTEM, L2, L1 } or new MemoryThreads[] { SYSTEM, L1 }
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) static Hardware AARCH64__08
      M1 Pro Mainly modelled after the performance cores since there are more of those.
      static long CPU_CACHE_LINE_SIZE
      Cache-line size is (typically) 64 bytes
      private BasicMachine[] myLevels  
      static long OS_MEMORY_PAGE_SIZE
      Page size is usually determined by the processor architecture.
      (package private) static Hardware PPC__01
      CLAM / PowerBook6,5 1 processor 1 core per processor 1 thread per core === 1.25GB system RAM 512kB L2 cache per processor 64kB L1 cache per core
      static java.util.Set<Hardware> PREDEFINED
      Should contain all available hardware in ascending "power" order.
      (package private) static Hardware X86__01
      INTEL1 1 processor 1 core per processor 1 thread per core === 1GB system RAM 1MB L2 cache per processor 32kB L1 cache per core
      (package private) static Hardware X86__02
      B5950053 1 processor 2 cores per processor 1 thread per core === 3.5GB system RAM 6MB L2 cache per processor (2 cores) 32kB L1 cache per core
      (package private) static Hardware X86_64__02
      MANTA / iMac7,1 1 processor 2 cores per processor 1 thread per core === 3GB system RAM 4MB L2 cache per processor (2 cores) 32kB L1 cache per core
      (package private) static Hardware X86_64__04
      (package private) static Hardware X86_64__04_1_L2
      PA's Q9400 1 processors 4 cores per processor 1 thread per core (4 threads in total) === 3GB system RAM 3MB L2 cache per 2 cores 32kB L1 cache per core PA's Q6600 1 processors 4 cores per processor 1 thread per core (4 threads in total) === 8GB system RAM 4MB L2 cache per 2 cores 32kB L1 cache per core
      (package private) static Hardware X86_64__04_1_L3
      Intel i5-4670K with 16GB of RAM 1 processors 4 cores per processor 1 thread per core (4 threads in total) === 16GB system RAM 6MB L3 cache per processor 256kB L2 cache per core 32kB L1 cache per core Intel Core i5-3570K with 32GB of RAM (from Java Matrix Benchmark) 1 processors 4 cores per processor 1 thread per core (4 threads in total) === 32GB system RAM 6MB L3 cache per processor 256kB L2 cache per core 32kB L1 cache per core
      (package private) static Hardware X86_64__04_2
      BUBBLE / MacBookAir4,2 1 processors 2 cores per processor 2 threads per core (4 threads in total) === 4GB system RAM 3MB L3 cache per processor 256kB L2 cache per core 32kB L1 cache per core PA's Intel Core i7-620M laptop 1 processors 2 cores per processor 2 threads per core (4 threads in total) === 8GB system RAM 4MB L3 cache per processor 256kB L2 cache per core 32kB L1 cache per core MacBookPro14,2 (oyster) 1 processors 2 cores per processor 2 threads per core (4 threads in total) === 8GB system RAM 4MB L3 cache per processor 256kB L2 cache per core 32kB L1 cache per core
      (package private) static Hardware X86_64__08
      HA's Intel Core i7-920 server 1 processor 4 cores per processor 2 threads per core (8 threads in total) === 8GB system RAM 8MB L3 cache per processor 256kB L2 cache per core 32kB L1 cache per core Core i7-2600 3.4 GHz - 4 cores - 8 threads from Java Matrix Benchmark 1 processor 4 cores per processor 2 threads per core (8 threads in total) === 11GB system RAM 8MB L3 cache per processor 256kB L2 cache per core 32kB L1 cache per core Core i7-3770 3.4 GHz - 4 cores - 8 threads (whale @ MSC/MSB) 1 processor 4 cores per processor 2 threads per core (8 threads in total) === 8GB system RAM 8MB L3 cache per processor 256kB L2 cache per core 32kB L1 cache per core Core i7-2600 3.4 GHz - 4 cores - 8 threads (Vostro-460 @ Scila) 1 processor 4 cores per processor 2 threads per core (8 threads in total) === 32GB system RAM 8MB L3 cache per processor 256kB L2 cache per core 32kB L1 cache per core Google Cloud Platform Compute Engine n1-standard-8 (8 vCPUs, 30 GB memory, Skylake) 1 processor 4 cores per processor 2 threads per core (8 threads in total) === 30GB system RAM 8.25MB L3 cache per processor 1MB L2 cache per core 32kB L1 cache per core
      (package private) static Hardware X86_64__12
      "Gulftown" (32 nm) Model: SLBUZ (B1) Intel Core i7-980 3.33GHz 8/25/2010 ref: http://ark.intel.com/products/47932 https://en.wikipedia.org/wiki/List_of_Intel_Core_i7_microprocessors Device Manager
      (package private) static Hardware X86_64__16
      SAILFISH / MacPro4,1 2 processors 4 cores per processor (8 cores in total) 2 threads per core (16 threads in total) === 12GB system RAM 8MB L3 cache per processor 256kB L2 cache per core 32kB L1 cache per core OCTOPUS / MacBookPro16,1 1 processors 8 cores per processor (8 cores in total) 2 threads per core (16 threads in total) === 64GB system RAM 16MB L3 cache per processor 256kB L2 cache per core 32kB L1 cache per core
      (package private) static Hardware X86_64__64
      CBL (prod & test) 2 x Intel(R) Xeon(R) CPU E5-2697A v4 @ 2.60GHz 2 processors 16 cores per processor (32 cores in total) 2 threads per core (64 threads in total) === 512GB system RAM 40MB L3 cache per processor 256kB L2 cache per core 32kB L1 cache per core CBF (simu) 4 x Intel(R) Xeon(R) CPU E7-4809 v3 @ 2.00GHz 4 processors 8 cores per processor (32 cores in total) 2 threads per core (64 threads in total) === 512GB system RAM 20MB L3 cache per processor 256kB L2 cache per core 32kB L1 cache per core
      (package private) static Hardware X86_64__96
      CBF (prod) 4 x Intel(R) Xeon(R) CPU E7-4830 v3 @ 2.10GHz 4 processors 12 cores per processor (48 cores in total) 2 threads per core (96 threads in total) === 512GB system RAM 30MB L3 cache per processor 256kB L2 cache per core 32kB L1 cache per core
    • Constructor Summary

      Constructors 
      Constructor Description
      Hardware​(java.lang.String arch, BasicMachine[] levels)
      new BasicMachine[] { SYSTEM, L3, L2, L1 } or new BasicMachine[] { SYSTEM, L2, L1 } or in worst case new BasicMachine[] { SYSTEM, L1 }
    • Field Detail

      • CPU_CACHE_LINE_SIZE

        public static final long CPU_CACHE_LINE_SIZE
        Cache-line size is (typically) 64 bytes
        See Also:
        Constant Field Values
      • OS_MEMORY_PAGE_SIZE

        public static final long OS_MEMORY_PAGE_SIZE
        Page size is usually determined by the processor architecture. Traditionally, pages in a system had uniform size, such as 4,096 bytes. However, processor designs often allow two or more, sometimes simultaneous, page sizes due to its benefits. There are several points that can factor into choosing the best page size.

        Practically all architectures/OS:s have a page size of 4k (one notable exception is Solaris/SPARC that have 8k)

        AArch64 supports three different granule sizes: 4KB, 16KB, and 64KB.

        See Also:
        Constant Field Values
      • PREDEFINED

        public static final java.util.Set<Hardware> PREDEFINED
        Should contain all available hardware in ascending "power" order.
      • AARCH64__08

        static final Hardware AARCH64__08

        M1 Pro Mainly modelled after the performance cores since there are more of those. Also did not separate between L2 and L3/SLC cache since there are 2 of each and they are the same size per thread.

        Notes: M2, M2 Pro, M2 Max, M2 Ultra -> 1, 2, 4, 8 memory controllers resulting in 100GB/s, 200GB/s, 400GB/s and 800GB/s Memory Bandwidth

        • Apple M1 Pro
          • L1 Cache the high-perf cores have a large 192 KB of L1 instruction cache and 128 KB of L1 data cache The energy-efficient cores have a 128 KB L1 instruction cache, 64 KB L1 data cache.
          • L2 Cache (28MB all together) The 6 high-perf cores are split in two clusters, each cluster has 12MB of shared L2 cache (so 24MB total) The 2 high-efficiency cores have 4MB of shared L2 cache
          • L3 / SLC (24MB all together) The SLC is 12MB per memory controller, so 24MB total.
          • 16 GB unified memory
        • squid / 15" MacBook Air 2023, Apple M2
          • 8 cores (4 performance and 4 efficiency)
          • L1: Performance cores 192+128 KB per core / Efficiency cores 128+64 KB per core
          • L2: Performance cores 16 MB / Efficiency cores 4 MB
          • L3: 8 MB
          • 24 GB unified memory
      • PPC__01

        static final Hardware PPC__01
        • CLAM / PowerBook6,5
          • 1 processor
          • 1 core per processor
          • 1 thread per core
          • ===
          • 1.25GB system RAM
          • 512kB L2 cache per processor
          • 64kB L1 cache per core
      • X86__01

        static final Hardware X86__01
        • INTEL1
          • 1 processor
          • 1 core per processor
          • 1 thread per core
          • ===
          • 1GB system RAM
          • 1MB L2 cache per processor
          • 32kB L1 cache per core
      • X86__02

        static final Hardware X86__02
        • B5950053
          • 1 processor
          • 2 cores per processor
          • 1 thread per core
          • ===
          • 3.5GB system RAM
          • 6MB L2 cache per processor (2 cores)
          • 32kB L1 cache per core
      • X86_64__02

        static final Hardware X86_64__02
        • MANTA / iMac7,1
          • 1 processor
          • 2 cores per processor
          • 1 thread per core
          • ===
          • 3GB system RAM
          • 4MB L2 cache per processor (2 cores)
          • 32kB L1 cache per core
      • X86_64__04_1_L2

        static final Hardware X86_64__04_1_L2
        • PA's Q9400
          • 1 processors
          • 4 cores per processor
          • 1 thread per core (4 threads in total)
          • ===
          • 3GB system RAM
          • 3MB L2 cache per 2 cores
          • 32kB L1 cache per core
        • PA's Q6600
          • 1 processors
          • 4 cores per processor
          • 1 thread per core (4 threads in total)
          • ===
          • 8GB system RAM
          • 4MB L2 cache per 2 cores
          • 32kB L1 cache per core
      • X86_64__04_1_L3

        static final Hardware X86_64__04_1_L3
        • Intel i5-4670K with 16GB of RAM
          • 1 processors
          • 4 cores per processor
          • 1 thread per core (4 threads in total)
          • ===
          • 16GB system RAM
          • 6MB L3 cache per processor
          • 256kB L2 cache per core
          • 32kB L1 cache per core
        • Intel Core i5-3570K with 32GB of RAM (from Java Matrix Benchmark)
          • 1 processors
          • 4 cores per processor
          • 1 thread per core (4 threads in total)
          • ===
          • 32GB system RAM
          • 6MB L3 cache per processor
          • 256kB L2 cache per core
          • 32kB L1 cache per core
      • X86_64__04_2

        static final Hardware X86_64__04_2
        • BUBBLE / MacBookAir4,2
          • 1 processors
          • 2 cores per processor
          • 2 threads per core (4 threads in total)
          • ===
          • 4GB system RAM
          • 3MB L3 cache per processor
          • 256kB L2 cache per core
          • 32kB L1 cache per core
        • PA's Intel Core i7-620M laptop
          • 1 processors
          • 2 cores per processor
          • 2 threads per core (4 threads in total)
          • ===
          • 8GB system RAM
          • 4MB L3 cache per processor
          • 256kB L2 cache per core
          • 32kB L1 cache per core
        • MacBookPro14,2 (oyster)
          • 1 processors
          • 2 cores per processor
          • 2 threads per core (4 threads in total)
          • ===
          • 8GB system RAM
          • 4MB L3 cache per processor
          • 256kB L2 cache per core
          • 32kB L1 cache per core
      • X86_64__08

        static final Hardware X86_64__08
        • HA's Intel Core i7-920 server
          • 1 processor
          • 4 cores per processor
          • 2 threads per core (8 threads in total)
          • ===
          • 8GB system RAM
          • 8MB L3 cache per processor
          • 256kB L2 cache per core
          • 32kB L1 cache per core
        • Core i7-2600 3.4 GHz - 4 cores - 8 threads from Java Matrix Benchmark
          • 1 processor
          • 4 cores per processor
          • 2 threads per core (8 threads in total)
          • ===
          • 11GB system RAM
          • 8MB L3 cache per processor
          • 256kB L2 cache per core
          • 32kB L1 cache per core
        • Core i7-3770 3.4 GHz - 4 cores - 8 threads (whale @ MSC/MSB)
          • 1 processor
          • 4 cores per processor
          • 2 threads per core (8 threads in total)
          • ===
          • 8GB system RAM
          • 8MB L3 cache per processor
          • 256kB L2 cache per core
          • 32kB L1 cache per core
        • Core i7-2600 3.4 GHz - 4 cores - 8 threads (Vostro-460 @ Scila)
          • 1 processor
          • 4 cores per processor
          • 2 threads per core (8 threads in total)
          • ===
          • 32GB system RAM
          • 8MB L3 cache per processor
          • 256kB L2 cache per core
          • 32kB L1 cache per core
        • Google Cloud Platform Compute Engine n1-standard-8 (8 vCPUs, 30 GB memory, Skylake)
          • 1 processor
          • 4 cores per processor
          • 2 threads per core (8 threads in total)
          • ===
          • 30GB system RAM
          • 8.25MB L3 cache per processor
          • 1MB L2 cache per core
          • 32kB L1 cache per core
      • X86_64__12

        static final Hardware X86_64__12
         "Gulftown" (32 nm) Model: SLBUZ (B1)
         Intel Core i7-980 3.33GHz
         8/25/2010
         ref: http://ark.intel.com/products/47932
              https://en.wikipedia.org/wiki/List_of_Intel_Core_i7_microprocessors
              Device Manager
         
        • Intel Core i7-980
          • 1 processor
          • 6 cores per processor
          • 2 threads per core (12 threads in total)
          • ===
          • 12GB system RAM
          • 12MB L3 cache per processor
          • 256kB L2 cache per core (x6)
          • 32kB L1 cache per core (x6)
      • X86_64__16

        static final Hardware X86_64__16
        • SAILFISH / MacPro4,1
          • 2 processors
          • 4 cores per processor (8 cores in total)
          • 2 threads per core (16 threads in total)
          • ===
          • 12GB system RAM
          • 8MB L3 cache per processor
          • 256kB L2 cache per core
          • 32kB L1 cache per core
        • OCTOPUS / MacBookPro16,1
          • 1 processors
          • 8 cores per processor (8 cores in total)
          • 2 threads per core (16 threads in total)
          • ===
          • 64GB system RAM
          • 16MB L3 cache per processor
          • 256kB L2 cache per core
          • 32kB L1 cache per core
      • X86_64__64

        static final Hardware X86_64__64
        • CBL (prod & test) 2 x Intel(R) Xeon(R) CPU E5-2697A v4 @ 2.60GHz
          • 2 processors
          • 16 cores per processor (32 cores in total)
          • 2 threads per core (64 threads in total)
          • ===
          • 512GB system RAM
          • 40MB L3 cache per processor
          • 256kB L2 cache per core
          • 32kB L1 cache per core
        • CBF (simu) 4 x Intel(R) Xeon(R) CPU E7-4809 v3 @ 2.00GHz
          • 4 processors
          • 8 cores per processor (32 cores in total)
          • 2 threads per core (64 threads in total)
          • ===
          • 512GB system RAM
          • 20MB L3 cache per processor
          • 256kB L2 cache per core
          • 32kB L1 cache per core
      • X86_64__96

        static final Hardware X86_64__96
        • CBF (prod) 4 x Intel(R) Xeon(R) CPU E7-4830 v3 @ 2.10GHz
          • 4 processors
          • 12 cores per processor (48 cores in total)
          • 2 threads per core (96 threads in total)
          • ===
          • 512GB system RAM
          • 30MB L3 cache per processor
          • 256kB L2 cache per core
          • 32kB L1 cache per core
    • Constructor Detail

      • Hardware

        public Hardware​(java.lang.String arch,
                        BasicMachine[] levels)
        new BasicMachine[] { SYSTEM, L3, L2, L1 } or new BasicMachine[] { SYSTEM, L2, L1 } or in worst case new BasicMachine[] { SYSTEM, L1 }
    • Method Detail

      • makeSimple

        public static Hardware makeSimple()
      • makeSimple

        public static Hardware makeSimple​(java.lang.String systemArchitecture,
                                          long systemMemory,
                                          int systemThreads)
      • compareTo

        public int compareTo​(Hardware other)
        Specified by:
        compareTo in interface java.lang.Comparable<Hardware>
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class CommonMachine
      • isL2Specified

        public boolean isL2Specified()
      • isL3Specified

        public boolean isL3Specified()