Why HB Takes a Long Time

Last Updated: 26 Sep 2013Hits: 4072
Why does it take so long to do Hierarchical Bayes analysis using either SSI Web or CBC/HB?

The CBC/HB System requires a fast computer and a generous amount of storage space, as offered by most every PC that can be purchased today. By today’s standards, a PC with a 2.8 GHz processor, 2 GB RAM, and 200 GB of storage space is very adequate to run CBC/HB for most problems.

Many people equate processor speed with overall speed. This is not the only factor. Overall speed is determined by the combination of processor speed, storage space speed/availability, and memory availability. The fastest processors on the market will not make the system significantly faster if the storage space and memory are too low. This is especially true for CBC/HB. While the algorithm is computationally intensive, it is often ‘I/O bound’ which means the running time is more dependent on factors such as storage space and memory. The data files in use by CBC/HB are either located on the hard drive or in memory, and are referenced quite often. If these are slow, or their capacities are insufficient, the fastest processor on the market will still appear to be slow.

In general, hard drive performance is optimal when the total used space is less than 50% of the capacity of the drive. Keep this in mind when selecting a hard drive. Other factors that affect performance are: transfer rate, seek time, and the drive’s RPM (revolutions per minute) speed.

Memory is often overlooked as a speed-increasing factor. When operating systems such as Windows begin to run out of memory, they swap things on and off the hard drive (called thrashing). This can bring a system to a standstill. Again, the rule of thumb is to have about twice as much memory as typically used. Various utilities can diagnose how much memory is commonly used. If the system takes a long time to start up, or if you notice that the hard drive activity light is on almost constantly, these are signs of insufficient memory.

Other common hardware questions:

Is there a 64-bit version of CBC/HB? Would I benefit from a 64-bit system?

CBC/HB v5 runs in 64-bit mode when using 64-bit versions of Windows, and in 32-bit mode on 32-bit Windows. Our tests of 64-bit performance can be found in the Winter 2008 Sawtooth Solutions (“X64 HB: Making Fast Even Faster”), available at Sawtooth Software’s website. In those tests, we found performance increases typically between 10%-25%.

Can CBC/HB use multi-core processors? Would such a system be faster?

Today most new machines contain multi-core processors, which allow multiple tasks to be performed simultaneously. For a program to take advantage of multiple processors it must be “multi-threaded,” which means that the software must run independent tasks on separate “threads.” The key is that each thread must be independent (i.e. rendering each pixel of an image can be done separately). While there are portions of the CBC/HB algorithm that are computed independently, overall the algorithm is highly dependent and thus does not lend itself well to multi-threading. We continue to do research in this area.

However, CBC/HB does benefit indirectly from having multiple processors. When faced with a process doing an intense computation, the operating system will attempt to give the process its own processor, and shift other processes to the other processors. So, if CBC/HB can run on one processor while everything else runs on others, it will run faster than when it must share only one processor.