PTTBBS Stress Test

You will personally launch a PTTBBS server and teach us how it’s possible the server architecture is able to serve 100000+ 鄉民 architecture.

You will demo stress test where you flood the server with concurrent connections and analyze its performance in real-time.

1997 學長

1997 NTHU BBS Admin Discussion:

Maple 3 應用實例 – Maple 發源地,bbs.cs.nthu.edu.tw 總部

看過 Maple 3 的 source,woju 覺得:

AMD-K6-200 + 128M ram + FreeBSD 2.2 + Maple 3

經營個 2000~3000 人 同時 上線的 BBS 是個「合理的應用」 ;-)

希望可以也有Sob的精緻功能

還有也希望能夠跟Sob相容那更好囉

Maple 3 是套「極為先進」的 telnet-based-BBS,有種種「另類風味」的「精緻功能」 :-)

But can you do so?

Requirements

Architecture Explanation

Begin your video with a brief, verbal explanation of the PTTBBS server architecture. You must cover:

  • The roles of the logind (dispatcher) and mbbsd (worker) processes and how they interact.
  • The concept of the “Fork-on-Demand” process model. Please explain when and why new processes are created (user login?).

Live Login Demo

Perform a live demonstration with two terminal windows:

  • Window A (User Action): Use a telnet client to connect to your running BBS server and log in as guest.
  • Window B (System Monitoring): Display a real-time view of the server’s processes using a tool like htop.

As you log in in Window A, point out the moment a new mbbsd process is dynamically created to handle your single connection. Show that the process terminates when you log out.

Stress Test

Run a stress-testing script that you have written.

The script generates a large number of concurrent connections (your goal should be 1000+) that log in as guest.

While your script is running, you must keep the htop window visible. As the server load increases, analyze what you are seeing in htop. Your analysis should include:

  • The total number of mbbsd processes being created.
  • The system’s CPU and memory response to the load (show us when you will hit overload in mbbsd.c, you can change MAX_CPULOAD, MAX_GUEST in include/config.h).
  • Connection failures or errors that occur.

References

  1. PTTBBS Docker Wiki
  2. Very helpful document!
Back to top