網際網路的快速發展使得人們開始將電腦資源透過網路來共享以及整合,藉此讓全世界的電腦聚合成數群虛擬的超級電腦,並利用它們來解決過去受限於運算能力不足而被認為無法解決的複雜問題。然而在這些機器互相連接所形成的P2P網路中,常常會發生有節點加入或離開網路的情況,而且這些機器上的資源也會經常變動,因此要有效利用這個網路中的資源,動態重新配置資源來做負載平衡就會是比較好的方法。 本研究提出一套數學模型和公式來判斷計算實體(例如行程、actor)的搬移時機。而且除了計算密集的應用程式之外,本研究還考慮了當此程式帶有資料檔案時,這些資料檔案經由網路傳輸所花費的時間及對效能的影響。本研究亦提出了債務的概念,來避免過度搬移的發生。另外本研究提出的公式具有可擴充性,可以在未來加入新型態的計算或儲存資源。 As the evolution of the Internet continues, it is possible to share and integrate resources of computers in several different ways. The Internet aggregates all computers over the world as a whole and creates numerous groups of computers with great computing power. People can use them to solve many complicated problems which were considered too hard to be solved. However, those powerful computing resources are usually dynamic. There are often new arrivals and departures of computing nodes and constant changes of the computing resources on the hosts in the network. As a result, a P2P dynamic reconfiguration approach is more appropriate on such a system to achieve load balancing. Thus we can maximize the utilization of the resources in a self-adaptive manner. In this thesis, we propose a P2P, runtime reconfiguration model to judge whether or not a computing entity should migrate to improve overall performance on a given distributed computing environment. In addition to computation-intensive applications, the model also considers data-intensive applications which usually spend much time on I/O transmission. We also introduce the concept of “debt” to prevent a computing entity from frequent, unnecessary migrations which usually result from wrong migration decisions on an unstable computing environment. Our model is extensible: it is possible to add new types of resources as new model parameters because of the symmetry of the model parameters.