Abstract
With the increasing demands for fast development of robust protocols and applications, a convenient protocol development environment is required. Network simulation provides such an environment, but protocol codes must be re-written before simulation. Network emulation appears as an alternative choice for researchers. It provides a direct execution environment that protocol codes could be executed on it directly. However, the emulation suffers from some problems, such as limitations of the underlying hardware and the overheads that come from commodity software. The goal of our work is to improve the performance of the NS2 emulator. The first problem that we want to address is the interrupt overhead. Even though interrupts bring low latencies, they may cause a high overhead. Under the Linux operating system, frequent interrupts will slow the emulator down. To reduce the overhead, we use RTLinux to control the interrupts coming from network devices. Besides interrupts, unnecessary data transfers between user and kernel spaces could also be a problem. Emulators often need only a portion of a packet, but the kernel may copy the whole packet from the kernel space to the user space. For this reason, we implemented a module that allows the emulator to retrieve the desired data of a packet only and the remaining data will be preserved in the kernel space for future dispatching. Finally, we port the emulator to a cluster system based on the VI architecture to investigate the performance improvement without any networking overheads. This gives us a sense of the best performance of the NS emulator.