![]() Cloud machines are also shared, and what other tenants do on your machine may affect your CPU throughput. Neither of these self-reported identifiers can be trusted: Virtualization platforms can and usually do lie about the underlying CPU. The Google Cloud (GCP) High CPU instance reports itself as an “Intel(R) Xeon(R) CPU” running at 3.10 GHz. The Digital Ocean (DO) High CPU instance reports itself as an “Intel(R) Xeon(R) Platinum 8168 CPU” running at 2.70 GHz. Two of the machines tested are cloud instances in Digital Ocean and Google Cloud, respectively. In fact, a serious time measurement bug found during review delayed this post by a few weeks.įixes and suggestions are welcome on Github.Īll measurements reflect an average of 10 trials.It is also certain to have multiple bugs.It may not be the fastest possible version.The code used to generate the performance numbers is written in C and lacks tests.No attempt was made to ensure a fair apples-to-apples comparison of different processors or machines. So what if we can coax each processor into doing more than one comparison at a time? Maybe there’s some kind of service where we can get a lot of processors on short notice.Īll of a sudden this is starting to look tractable! Crunching the numbersĭisclaimer: Before we get to the numbers, I want to emphatically state that this is a fun experiment and not a benchmark. Thankfully, brute force comparison is an embarrassingly parallel problem, where the work can be evenly distributed among many processors. Smallestįigure 1: Getting an intuitive feel for the size of 2 64 by comparing it to other large numbers.Ī modern CPU can execute about 270 billion instructions per second, so exhausting a 2 64 search space would take 776 days-a little more than two years. How long would it take? And how much would it cost? How big is a 64-bit number?Ī 64-bit number can hold 2 64 (that is, 18,446,744,073,709,551,616) distinct values-more than the grains of sand on Earth and cells in the human body (Figure 1). Still, we must consider just how intractable it is to guess a 64-bit number by simply trying all possibilities. Imagine what we can achieve using the full arsenal of modern computing power! Looking at this problem also shows that as hardware gets faster, new sets of computational problems become possible. Fortunately, no one has to use brute force in such situations, because there are better approaches like removing the comparison, using pre-made input seeds, dictionaries, symbolic execution, and compile-time transformation.īut the problem of a brute force guess is easy to understand and parallelize, demonstrating just how effective parallelization can be against a herculean task. When fuzzing, it’s common to run into comparisons against such “magic” 64-bit values, but guessing these values is seen as a canonical impossible problem. Why try to guess a 64-bit number? Modern processors operate on 64-bit quantities, so 64 bits is a natural size for magic numbers, headers, and other markers. Along the way we’ll touch on a variety of topics about microprocessors and some interesting discoveries, e.g., adding more cores isn’t always an improvement, and not all cloud vCPUs are equivalent. We’ll discuss parallelization at the CPU level with SIMD instructions, then via multiple cores, GPUs, and cloud computing. So we’re going to examine this problem starting with the most naive approach and then expand to other techniques involving parallelization. How quickly can we use brute force to guess a 64-bit number? The short answer is, it all depends on what resources are available.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |