SMTP Server architecture )救中国研究院 I thread to receive and dispatch SMTP request I worker thread per CPU SMTP Requests Event Loops(4 stages) Dispatcher Parse smtp headers/bodies Local delivery SMTP Routing Manager Delivery Header/ Socket send and file l/o Body Routing Parser One queue for each event loops Drain queue to empty before context switch
SMTP Server Architecture • 1 thread to receive and dispatch SMTP request • 1 worker thread per CPU • Event Loops (4 stages) – Parse SMTP headers/bodies – Local delivery – Routing – Socket send and file I/O • One queue for each event loops • Drain queue to empty before context switch SMTP Requests Dispatcher Local Delivery Routing I/O Manager SMTP Header/ Body Parser
Performance Improvement )救中国研究院 Overall Performance 30000 25000 220000 SMTP Server g815000 Threads sa10000 Traditional Threads 5000 68 Number of cpus
Performance Improvement Overall Performance 0 5000 10000 15000 20000 25000 30000 2 4 6 8 Number of CPUs Operations per Second SMTP Server Threads Traditional Threads