180 likes | 313 Vues
Understanding Factors That Influence Performance of a Web Server. Presentation CS535 Project By Thiru. Goals. Understand how a typical web server works Infer potential factors that can influence the performance Discover the dynamics of the interactions Look at each factor in detail
E N D
Understanding Factors That Influence Performance of a Web Server Presentation CS535 Project By Thiru
Goals • Understand how a typical web server works • Infer potential factors that can influence the performance • Discover the dynamics of the interactions • Look at each factor in detail • Some miscellaneous topics, if time permits • Conclude
What Is a Web Server ? • A server program implementing HTTP protocol • A typical server would: • Listen on a known port (usually 80) • When a request arrives, create a new socket, hand it over to a helper process • Go back to the listening mode • The helper process would communicate with the client and serve the request
What Is a Client ? • Typical client – a browser. • The steps involved in retrieving www.wpi.edu.
What Are the Potential Bottlenecks ? • The listening process • The forking model • The disk I/O • The network, i.E. The sending end • The scheduling model for tasks
Protocol Enhancement • From HTTP 1.0 to HTTP1.1 • Persistent connections
Data Touching Operations in TCP Reference: [1]
Forking • Spawn a new process for every request • Spawn a new thread for every request • Use events to handle requests • Use I/O completion mechanisms to handle processing of events • Use asynchronous model of execution
Disk I/O • Not a pressing issue • A lot of small files are cached in typical server implementation • mmap() maps files directly to memory
SRPT Scheduling (Shortest-remaining-processing-time) • Reference: [2]
SRPT Scheduling (contd…) • Reference: [2]
Enhance Network I/O Functions • Enhancements to poll() • Enhancements to select() • Declare_interest() • /Dev/poll on Solaris – add, modify, and remove interest sets
Use asynchronous model • RT signals in Linux – Abeshk Chandra’s paper.
Radically new approaches • DB approach • TCP server
The Big Picture • The end user experience can be enhanced in three ways • Replication of content – mirroring • Distributed caching • Improve WS performance
The Difference Between the Lab and the Real World • Slow and Indeterministic behavior of connections • Request sizes vary through a large range • In real world there are layers of caches and mirrors
The Difference Between the Lab and the Real World • Network speed – connection speed – varies widely • It’s hard to simulate real world environment in labs. Hence the results are hard to verify • The test beds are not accurate – the model is skewed. S-client paper
Conclusion • Factors influencing performance • Network I/O operations • Socket behavior • Scheduling • TCP implementation • Disk I/O does not have a big impact since small files are cached • A lot more, but this is what is presentable within 1800 seconds !