Quick Matrix Multiplication on Clusters of Workstations

Eyas El‐Qawasmeh, Abdel‐Elah Al‐Ayyoub, Nael Abu‐GhazalehInformatica 2004 · DOI

Abstract

A quick matrix multiplication algorithm is presented and evaluated on a cluster of networked workstations consisting of Pentium hosts connected together by Ethernet segments. The obtained results confirm the feasibility of using networked workstations to provide fast and low cost solutions to many computationally intensive applications such as large linear algebraic systems. The paper also presents and verifies an accurate timing model to predict the performance of the proposed algorithm on arbitrary clusters of workstations. Through this model the viability of the proposed algorithm can be revealed without the extra effort that would be needed to carry out real testing.

Introduction

Matrix multiplication is a fundamental operation in scientific computing, yet its standard $O(n^3)$ complexity poses a significant computational barrier for large-scale applications. While high-end supercomputers can mitigate this, their cost is often prohibitive. This research explores the use of Clusters of Workstations (COWs)—standard PCs networked via Ethernet—as a cost-effective alternative. By implementing a parallelized version of the JW algorithm (PJW), the authors aim to achieve $O(n^2/h)$ complexity on a cluster of $h$ workstations.

Methods

The Parallel JW (PJW) algorithm builds upon the original JW algorithm, which utilizes numerical packing to reduce matrix multiplication to a series of dot products. In the PJW implementation, rows of matrices $A$, $B$, and $C$ are distributed across $h$ hosts.

The algorithm involves several key stages, including packing matrix elements into large integers using a "divider" and exchanging pivot vectors across the network. A significant portion of the research focuses on a mathematical timing model that predicts execution time based on network latency, transmission costs, and arithmetic speeds. The specific computational load for each task within the algorithm is detailed in the complexity breakdown below.

Computational complexity breakdown for the PJW algorithm tasks.

Experimental Setup

The algorithm was evaluated using synthetic matrices of non-negative integers with orders ranging from 1,000 to 10,000. Testing was conducted on a cluster of 32 Pentium III workstations connected via 100 Mb/s Ethernet, utilizing both PVM and MPI message-passing libraries across 152 test runs.

Results and Analysis

The PJW algorithm demonstrated strong scaling properties. For a matrix of order 10,000, execution time was reduced from approximately 6 seconds on 4 hosts to just 1 second on 32 hosts. The 32-host cluster reached a throughput exceeding 650 MOPS (Millions of Operations Per Second).

Key findings include:

  • Communication Overhead: While computation time decreases with more hosts, communication costs increase. The study identifies the optimal cluster size before the network becomes a bottleneck.
  • Library Performance: MPI consistently outperformed PVM in this Ethernet environment due to lower message-passing overhead.
  • Model Accuracy: The mathematical timing model closely matched experimental results, validating its use for predicting performance on different cluster configurations without physical testing.
  • Memory Aggregation: The cluster's aggregate memory was essential for handling large matrices; for example, order 10,000 matrices required roughly 1.2 GB of RAM.

Conclusion

The PJW algorithm successfully leverages networked workstations to provide high performance for matrix multiplication at a fraction of the cost of proprietary systems. While the current implementation is optimized for non-negative integers, it demonstrates the potential of COWs for intensive algebraic tasks. Future work will address numerical overflow risks for floating-point data and explore higher-speed interconnects to further reduce communication bottlenecks.

Summary updated

Abstract

A quick matrix multiplication algorithm is presented and evaluated on a cluster of networked workstations consisting of Pentium hosts connected together by Ethernet segments. The obtained results confirm the feasibility of using networked workstations to provide fast and low cost solutions to many computationally intensive applications such as large linear algebraic systems. The paper also presents and verifies an accurate timing model to predict the performance of the proposed algorithm on arbitrary clusters of workstations. Through this model the viability of the proposed algorithm can be revealed without the extra effort that would be needed to carry out real testing.
BibTeX
@inproceedings{elqawasmeh2004quick,
  author = {Eyas El‐Qawasmeh and Abdel‐Elah Al‐Ayyoub and Nael Abu‐Ghazaleh},
  title = {{Quick Matrix Multiplication on Clusters of Workstations}},
  booktitle = {Informatica},
  year = {2004},
  doi = {10.15388/informatica.2004.054},
}

Loading related content...

Figure