標題: NCTUNS網路模擬器的效能增進
Improve the Performance of NCTUNS Network Simulator
作者: 邱昶清
Chang-Ching Chiou
王協源
Shie-Yuan Wang
資訊科學與工程研究所
關鍵字: 網路模擬器;依序詢問機制;系統核心模組式實作法;中斷觸發式實作法;訊號機制;效能提昇;Network Simulator;Polling Mechanism;In-Kernel Module Implementation;Interrupt Driven Implementation;Signal Mechanism;Performance Improvement
公開日期: 2000
摘要: NCTUNS為一具備擴充性及高解析度特性的TCP/IP網路模擬器。所有現存的應用程式如ftp、telnet…等,及常用的網路工具如netstat、tcpdump…等,皆可直接在NCTUNS所模擬出來的虛擬網路(simulated network)中執行以便產生網路流量,或收集網路相關的一些統計資料。另外,NCTUNS也在虛擬網路中每一虛擬節點(simulated node)提供標準的UNIX API。如此一來,研究者便可開發先進的應用程式或網路通訊協定並直接在虛擬節點中執行。NCTUNS所產生的模擬結果是源自於執行模擬主機(simulation host)上真實的TCP/IP通訊協定堆疊(protocol stack),其結果比一般學術界常用的其他網路模擬器所產生的結果更為真實可信。然而,由於NCTUNS標榜著在其創造出的虛擬網路中的幾乎一切皆為真實的,它的模擬速度可想而知自然比其他網路模擬器還慢上許多。 本論文主要目的便在於提昇整個NCTUNS網路模擬器的效能。本論文提供了兩種實作方法以提昇NCTUNS的效能,此兩種實作方法分別為「系統核心模組式實作法」及「中斷觸發式實作法」。系統核心模組式實作法在最好的情況下可將原來版本的NCTUNS提昇近700%的效能。其主要核心技術在於將整個NCTUNS所創造出來的虛擬網路完全置於系統核心(kernel)中以避免原來版本中依序詢問機制(polling mechanism)及記憶體拷貝所產生的多餘效能浪費。中斷觸發事實作法主要是利用UNIX系統中的訊號機制(signal mechanism)來通知模擬器對封包(packet)相關事件做對應處理,利用此方法來取代依序詢問機制並消除其所產生的效能浪費。此中斷觸發式實作法相較於原版本的NCTUNS可獲得近500%的效能提昇。
NCTUNS is an extensible and high-fidelity TCP/IP network simulator. All existing application programs such as ftp, telnet, and all network utilities such as tcpdump, netstat are immediately applicable on a simulated network to generate traffic, gather network statistics, etc. Additionally, the NCTUNS provides the standard UNIX API on every node in a simulated network. As such, future application programs or protocols can be developed and run on any node in a simulated network. Generated simulation results are derived from executing the real-life TCP/IP protocol stack on the simulation host. Thus they are more accurate and convincing than the results generated by other network simulators. However, because almost everything that NCTUNS runs is real, the simulation speed of NCTUNS is much slower than other networks. This paper provides two methods for improving the performance of the NCTUNS, which originally uses polling as its event detection mechanism. The two methods are the in-kernel module and the interrupt driven implementation, respectively. The in-kernel module implementation can improve the performance by up to 700 % in comparison with the original NCTUNS. It immerses the simulated network constructed by NCTUNS into the kernel to avoid the user level polling and memory copy overhead. The other method, the interrupt driven implementation, uses the UNIX signal mechanism to inform the simulator of some packet events. It can eliminate the polling overhead as well. As a result, this method can improve the performance by up to 500 % in comparison with the original NCTUNS.
URI: http://140.113.39.130/cdrfb3/record/nctu/#NT890392098
http://hdl.handle.net/11536/66889
顯示於類別:畢業論文