Web Performance Tuning. Speeding up the Web. 2nd Edition - Helion
ISBN: 978-14-919-5069-2
stron: 482, Format: ebook
Data wydania: 2002-03-19
Księgarnia: Helion
Cena książki: 143,65 zł (poprzednio: 167,03 zł)
Oszczędzasz: 14% (-23,38 zł)
As long as there's been a Web, people have been trying to make it faster. The maturation of the Web has meant more users, more data, more features, and consequently longer waits on the Web. Improved performance has become a critical factor in determining the usability of the Web in general and of individual sites in particular.Web Performance Tuning, 2nd Edition is about getting the best possible performance from the Web. This book isn't just about tuning web server software; it's also about streamlining web content, getting optimal performance from a browser, tuning both client and server hardware, and maximizing the capacity of the network itself.Web Performance Tuning hits the ground running, giving concrete advice for quick results -- the "blunt instruments" for improving crippled performance right away. The book then shifts gears to give a conceptual background of the principles of computing performance. The latter half of the book examines each element of a web transaction -- from client to network to server -- to find the weak links in the chain and show how to strengthen them.In this second edition, the book has been significantly expanded to include:
- New chapters on Web site architecture, security, reliability, and their impact on performance
- Detailed discussion of scalability of Java on multi-processor servers
- Perl scripts for writing web performance spiders that handle logins, cookies, SSL, and more
- Detailed instructions on how to use Perl DBI and the open source program gnuplot to generate performance graphs on the fly
- Coverage of rstat, a Unix-based open source utility for gathering performance statistics remotely
Osoby które kupowały "Web Performance Tuning. Speeding up the Web. 2nd Edition", wybierały także:
- Mastering MEAN Stack 88,72 zł, (67,43 zł -24%)
- Psychology of UX Design 88,72 zł, (67,43 zł -24%)
- Time Is Money. The Business Value of Web Performance 74,99 zł, (63,74 zł -15%)
- SVG Text Layout. Words as Art 94,98 zł, (80,73 zł -15%)
- Discussing Design. Improving Communication and Collaboration through Critique 94,98 zł, (80,73 zł -15%)
Spis treści
Web Performance Tuning. Speeding up the Web. 2nd Edition eBook -- spis treści
- Web Performance Tuning, 2nd Edition
- Preface
- What Is This Book Good For?
- Audience for This Book
- Assumptions of This Book
- How This Book Is Organized
- Part I: Preliminary Considerations
- Part II: Tuning in Depth
- Font Conventions
- How to Contact Us
- Web Site Updates and Code Examples
- Other Books and Resources
- Books
- Web Sites with Performance Information
- Newsgroups with Web Performance Content
- Disclaimer
- Acknowledgments for the Second Edition
- I. Preliminary Considerations
- 1. The Quick and the Dead
- Questions for the Browser Side
- Is Your Modem On?
- Is Your Modem Connected to Your Computer?
- Did the Other End Hang Up on You?
- Are You Sending Data over the Modem?
- Do You Have a Valid IP Address and Gateway Router?
- Is the Browser Hanging?
- Is Your Browser in Offline Mode?
- Can You Still Resolve Names?
- Is an Intermediate Router Down or Very Slow?
- Is the Remote Site Overloaded?
- Is the Remote Site Down?
- Is There a Mirror Site?
- Did You Already Get Most of the Page?
- Is Your MTU too Big, or too Small?
- Do You Need to Use a Proxy Server?
- Does Your Proxy Handle https URLs?
- Is There a Faster Proxy Server?
- Are You Being Blocked Deliberately?
- Are You Running too Many Programs?
- Do You Have Enough Memory?
- Is Your CPU Fast Enough?
- Do You Have Enough Bandwidth?
- Are Excessive Images Dragging Down Your Performance?
- Is Browser Startup Time Getting You Down?
- Are You Using a Slow Browser?
- Is Your Cache Big Enough?
- Are You Wasting Time Verifying Cached Pages?
- Is Java Startup Time Annoying You?
- Could You Benefit from Using a Specific ISP?
- Are You Surfing at Slow Times?
- Could Your Organization Benefit by Installing a Proxy Server?
- Questions for the Server Side
- Is Your Server Sleeping?
- Is Your DNS Server Overloaded?
- Do Your Images All Have Sizes and ALT Tags?
- Do All Your Applets Have ALT Tags?
- Are There Needless or Slow Redirects?
- Is Your Web Server Wasting Time on Reverse DNS Lookups?
- Is Your Web Server Retransmitting too Much?
- Are You too Far Away from Your Users?
- Is Your Server Network Connection Overloaded?
- Is Your Server CPU-Bound?
- Are You Short of Memory?
- Are Your Disks too Busy?
- Could You Benefit from Caching Services?
- Are You Suffering from Performance Bugs That Have Already Been Fixed?
- Is cron Killing Performance at Regular Intervals?
- Is Your Web Site Being Crowded by Other Processes?
- Are You Wasting Time with SSIs?
- Is Your Content Unncessarily Dynamic?
- Is Your Database Connection Pool too Small?
- Is Your Database Connection Pool Leaking?
- Are Your Hubs, Switches, and Routers Overloaded or Misconfigured?
- Do Java Processes Suddenly Stall?
- Are You Using CORBA, EJBs, or RMI?
- Are You Doing Excessive Logging?
- Are You Serving Content Directly from a Revision Control System?
- The Server Is Not at All Busy, but Its Slow!
- Key Recommendations
- Questions for the Browser Side
- 2. Web Site Architecture
- Trade-offs
- State Versus Scalability
- Replication Versus Simplicity
- Synchronous Versus Asynchronous
- Connectionless Versus Connectionful
- Planning Versus Doing
- Procedural Versus Object-Oriented
- Elements
- Browser
- Load Balancer
- DNS level
- IP level
- Ethernet level
- Web Server
- Middleware
- Database
- Example Web Site Architectures
- One Box
- Stacks
- Layers
- Linux on the Mainframe
- Real Time
- Trends
- Sample Configurations
- Low Volume
- Medium Volume
- High Volume
- Key Recommendations
- Trade-offs
- 3. Capacity Planning
- Do the Math . . .
- . . . But Trust Your Eyes More than the Math
- Questions to Ask
- How Many HTTP Operations per Unit Time Do You Expect?
- What Is the Purpose of the Web Site?
- How Tolerant Are Your Users?
- Will You Provide Any Streaming Media?
- Will the Web Server Spawn Additional Processes?
- What Other Processes Need to Run on the Web Server or over the Network?
- What Sort of Scalability Do You Need?
- What Is Your Budget?
- How Available Does Your Site Have to Be?
- Can You Force Suppliers to Compete?
- Hey Kid, Want to Try a Browser?
- Other Questions
- How Much Bandwidth Do You Need?
- Latencies Are More Important than Bandwidth
- Thinking About Bandwidth
- Estimating Web Server Network Bandwidth
- How Fast a Server Do You Need?
- How Much Memory Do You Need?
- Memory for the Operating System
- Memory for httpd
- Memory for Content
- Memory for CGIs
- Key Recommendations
- 4. Performance Monitoring
- Parameters of Performance
- Latency and Throughput
- Network Latency
- Measuring Network Latency and Throughput
- Using FTP
- Other performance measures
- Utilization
- Efficiency
- Using a Shell Script
- Using C
- Using Perl
- Monitoring Web Performance Using Perl
- Plotting Results with Gnuplot
- An Example Monitoring Script in Perl
- The Pieces
- Automatically Generating Monitoring Scripts Using Sprocket
- Using a Relational Database to Store and Retrieve Your Monitoring Data
- Storing Data
- Retrieving Data
- Monitoring Machine Utilization with rstat
- Storing rstat Data in a Relational Database
- Using rstat Data
- Getting Data from the Database to Standard Output
- Generating Graphs Directly from an rstat Database
- Monitoring Per-Process Statistics
- Using CGIs to Run Tools
- Using rstat to Trigger Deeper Analysis
- Using Telnet from Perl
- Generating Graphs from ps Data
- Monitoring Other Things
- Using Java for Monitoring
- Making a System Dashboard Web Page
- Danger! Excessive Monitoring is Hazardous to Your Web Sites Health
- SNMP
- RMON
- ARM
- Other Resources
- Key Recommendations
- 5. Load Testing
- Load Test Preparation
- Watch Out for Clock Changes
- Why Is Production Performance Different from Test Performance?
- Trade-offs with Load Testing Tools
- Writing Your Own Load Testing Tools
- The Timer Problem
- Load Testing by Excessive Monitoring
- Synchronizing a Load Test
- Randomizing a Load Test
- Help, I Have to Stop My Load Test!
- Generating Network Load
- Benchmark Specifications and Benchmark Tests
- WebStone
- SPECweb99
- TPC-C and TPC-D
- Proxy Benchmarks
- Vendor-Standard Benchmarks
- CaffeineMark
- Other Resources
- Key Recommendations
- Load Test Preparation
- 6. Performance Analysis
- Using analysis.cgi to Find a Bottleneck
- Snooping HTTP with Sprocket
- Look at Connections
- Log File Analysis
- Average Transfer Size
- Response Size Distribution
- Hits per Second
- Variable Load and Queue Length
- When Exactly Are Hits Logged?
- Who Is the Most Common User?
- Which Process Is Mine?
- Who Is Using That File?
- What Files Are My Process Using?
- What Happens if the Database Is Hung?
- A Few More Tips
- Key Recommendations
- 7. Reliability
- Typical Failures
- Disk Full
- Process Out of File Descriptors
- C Pointer Error
- Memory Leaks
- Thread Deadlock
- Dead Process Holding Lock
- Server Overloaded
- Load Balancer Fails to Detect Dead Machine
- Subnet Flooded
- Out of ptys
- Database Out of Cursors
- Bad Device Driver
- Hardware Failures
- Power Outage
- Administrator on Wrong Server
- Wildcards Including Wrong File
- Permissions Problems
- Path Problems
- Patch Problems
- Cascade of Overloads
- Monitoring Causing Failures
- Retries Cause Further Failures
- Critical Tables Locked by Accident
- Using a Database Where Files Will Do
- Program Fails to Reconnect to Database After Failure
- Program Fails to Restart After Reboot
- Split-Brain Syndrome
- Firewall Cleanup Blocks Essential Service
- Screen Scraping Fails Because of Design Change
- Dependencies
- Smoothing Outages
- Key Recommendations
- Typical Failures
- 8. Security
- HTTPS and SSL
- Firewalls
- Bastion Hosts
- chroot
- Key Recomendation
- 9. Case Studies
- Database Table Growing Without Limit
- Reverse DNS Lookups Slows Logging
- Kinked Cable
- Database Connection Pool Growth Limits Performance
- Key Recommendation
- 10. Principles and Patterns
- Principles of Performance Tuning
- Sometimes You Lose
- To Measure Something Is to Change It
- Reading Is Fundamental
- There Is No Free Lunch
- Returns Diminish
- Portability Will Reduce Performance
- Increasing Abstraction Will Reduce Performance
- Security Will Reduce Performance
- Memory Is Hierarchical
- Caches Depend on Locality of Reference
- I/O Is Slow
- Information Is Relative
- Hardware Is Cheap, Software Is Expensive
- The Goal of Tuning Is Simultaneous Failure
- Better Is Relative
- Bits Are Cost
- Internet Performance Degrades Nonlinearly
- Tuning at the Highest Level Gives the Biggest Gains
- Whatever Occurs Once Is Likely to Happen Again Soon
- The 80/20 Rule
- Its Not What You Know, Its Whom You Know
- Patterns of Performance Improvement
- Amortization
- Caching
- Profiling
- Parallel Processing
- Using What You Know
- Simplicity
- Key Recommendations
- Principles of Performance Tuning
- 1. The Quick and the Dead
- II. Tuning in Depth
- 11. Browsers
- How Browsers Work
- Types of Browsers
- Netscape
- Internet Explorer
- Opera
- Neoplanet
- WebTV
- Cello
- Mosaic
- Lynx
- Amaya
- Tango
- The Perfect Browser
- Browser Speed
- Browser Tuning Tips
- General Tips
- Upgrade
- Do less
- Use shortcuts
- Increase caches
- Reboot
- Multitask
- Stop it
- Use Java plug-in
- Browse in a new window
- Internet Explorer Tips
- Dont redraw while scrolling
- Browse in a new process
- Netscape Tips
- Prestart Java
- Use fewer colors
- Make smaller buttons
- General Tips
- Non-Browser Web Clients
- Gnutella and Peer to Peer
- Key Recommendations
- 12. Client Operating System
- Microsoft Windows
- System Clutter
- Specific Video Drivers
- Memory and Disk
- System Monitor
- Network Utilities
- MTU
- Macintosh
- 68K Emulation
- Networking
- Memory and Disk
- Extensions
- Unix
- Key Recommendations
- Microsoft Windows
- 13. Client Hardware
- CPU
- RAM
- Cache
- Bus
- Disk
- IDE
- SCSI
- Fragmentation
- Video
- MMX
- Colors and Resolution
- Drivers
- 3D and Video Clips
- Video Card Benchmarks
- I/O Port
- The UART
- BIOS
- Key Recommendations
- 14. Lines and Terminators
- Forwarding and Latency
- Your Modem, the Information Driveway
- Latency and Throughput, Modem to Modem
- Getting Synchronous
- Hardware Compression
- Error Correction
- Line Quality
- Internal Modems Are Faster
- UART Buffer Overruns
- AT Commands and Dialing Time
- Bonding Channels
- ISDN
- Cable Modems
- xDSL
- Higher Capacity Lines
- 56K, T1, and T3
- Frame Relay
- ATM
- Satellite
- Intranets
- Partitioning
- Hardware for Partitioning
- Ethernet
- Packet Snooping
- NIC Buffers
- Fast Ethernet
- Switched Ethernet
- Ethernet Cabling
- Noise
- Network Modeling Tools
- The Internet
- Bypassing the Internet
- NAPs
- ISPs
- Placement
- ISP performance
- Choosing an ISP
- Co-location and mirroring
- Routers
- Placing Blame
- The Future of the Internet
- Internet2
- NGI
- PTTs
- Key Recommendations
- 15. Network Protocols
- Power and Protocols
- Factors Affecting Network Protocol Performance
- Fixed- Versus Variable-Sized Packets/Cells/Frames
- Piggybacking
- Pipelining Versus ACK-ing Each Packet
- Full/half duplex
- Errors
- Number of Hops
- Layers
- The Protocols of the Web
- ARP
- PPP
- Routing Protocols
- IP
- TCP
- Use latest TCP patches
- TCP parameters
- Listen queues
- Retransmission delay
- TIME_WAIT interval
- Abort interval
- Maximum segment lifetime and maximum connection rate
- Keepalive interval
- Receive window
- Delayed ACK
- Slow start
- Maximum Segment Size
- Monitoring TCP
- T/TCP
- UDP
- DNS
- NFS
- HTTP
- Stateless and connectionless
- Asymmetric
- Text-based
- Compression
- Cache control
- The trailing slash
- HTTP 1.1 improvements
- HTTP proxy request format
- Byterange downloads
- HTTP and filesystems
- FTP
- NNTP
- CORBA
- X
- Key Recommendations
- 16. Server Hardware
- Box on a Wire
- Good I/O
- Multiple Busses
- Fast Disks
- Lots of Memory
- Scalability
- Network Interface Card
- Bus
- Memory
- RAM Characteristics
- CPU
- CPU Construction
- Symmetric Multiprocessing (SMP)
- Testing Sun SMP Scalability
- Disk
- Disk Architecture and Parameters
- IDE
- EIDE
- SCSI
- Fibre Channel
- RAID
- Typical Disk Performance
- Fragmentation
- Disk Activity and PID
- Key Recommendations
- 17. Server Operating System
- Unix and the Origin of the Web
- Unix Flavors
- Solaris
- AIX
- Digital Unix
- Linux
- Irix
- BSD
- Mach OS
- System Calls Versus Library Calls
- Processes and the Kernel
- Scheduling
- Kernel Context
- Unix and httpd
- Solaris Network Cache and Accelerator
- Linux khttpd
- Reducing the Load on the OS
- Process Creation
- Address Space
- Copying in Memory
- Reclaiming Memory
- The Filesystem
- Filename Length
- Full Filesystems
- Directories
- Filesystem Caching
- Directory Name Lookup Cache
- Fragmentation
- The Windowing System
- Versions and Patches
- Configurable OS Parameters
- Number of File Descriptors
- Number of Processes
- Network Buffers
- Memory Limits
- Flushing Frequency
- Priority
- Timer Interrupt
- Unix OS Monitoring Tools
- ps
- perfbar
- perfmeter
- perfmon
- rstat
- rup
- hstat
- top
- xload
- System Call Tracers
- Network Snooping Tools
- netstat
- vmstat
- sar
- How Many Connections Can My Server Handle?
- How Many Processes Can My Server Handle?
- How Quickly Can My Server Fork New Processes?
- Unix Versus NT as the Web Server OS
- NT Pros and Cons
- Unix Pros and Cons
- The Exokernel
- Key Recommendations
- 18. Server Software
- The Evolution of Web Servers
- Servers Spawned from inetd
- Forking Servers
- Threaded Servers
- Keepalive Servers
- System Calls Made by a Web Server
- How Servers Fail
- Memory Leaks
- Configuring Apache and Netscape Web Servers
- Configuring Apache
- AllowOverride
- BUFFERED_LOGS
- MaxClients
- Persistent connections
- Turning off reverse DNS
- Do not restrict by domain
- Set FollowSymLinks
- FancyIndexing
- Use specific index files
- MaxRequestsPerChild
- Some notes on sizing Apache
- Using mod_status
- For more information
- Configuring Netscape
- Number of processes
- Number of server threads
- Turning off reverse DNS
- Persistent connections
- File cache
- pwfile
- CGI timeout
- RqThrottle
- Disable extraneous features
- Using perfdump
- For more information
- Configuring Apache
- Other Servers
- Boa
- IIS
- Java Web Server
- Jigsaw
- NCSA
- Zeus
- Missing Features
- Proxy Servers
- Hierarchical Caches
- Key Recommendations
- The Evolution of Web Servers
- 19. Content
- Size Matters
- As Good As It Gets
- Caching and Differences
- HTML and Compression
- gzip
- Performance Tips for HTML Authors
- Make It Easy on the Server
- Make It Easy on the Network
- Make It Easy on the Browser
- Make It Easy on the User
- Watch Out for Composition Tools with a Bias
- Keep Up with the State of the Art
- Use an HTML Validator
- The Document Object Model
- Graphics
- Weight Watching
- Consolidation
- Reuse
- Psychology
- Formats
- Audio
- Video
- Key Recommendations
- 20. Custom Applications
- Programmers
- CGI Programs
- CGI Internals and Performance Problems
- General CGI Tips
- Infinite Loops
- How to find and kill infinitely looping CGIs
- Runaways
- Guarding against infinitely looping CGIs
- Dont Keep the Customer Waiting
- Push State or Processing into the Browser
- Cookies
- Java
- Preprocess Queries and Cache the Results
- Small Is Beautiful
- Scaling Issues
- Break Up Long Forms into Several Small Forms
- Server DNS Lookup
- Debug and Optimize
- Infinite Loops
- CGI Language-Specific Optimization Tips
- Shell Scripts
- Perl
- C
- Daemonize It
- CGI Database Access Performance
- Logging
- NSAPI and ISAPI
- DOM
- JSP, ASP, PHP
- Key Recommendations
- 21. Java
- Java Will Never Be Good Enough for GUI Applications
- Java Is Good Enough for the Server Side
- Performance Problems Intrinsic to Java
- Array Bounds Checking
- Blocking Network I/O
- Bytecode Interpretation
- Bytecode Verification
- Dynamic Method Binding
- Garbage Collection
- Indirections
- i18n & l10n
- OO
- Stack-based
- Synchronization
- Threading
- Coding Tips
- Use Good Algorithms
- Keep Short Inheritance Chains
- Use Stack Variables
- Merge Classes
- Use Java Libraries
- Do Not Poll
- Finalize Methods
- Create Fewer Objects
- Beware of Object Leaks
- Consider Not Using Accessor Methods
- Use Compound Operators
- Use Int Increments
- Be Conscious of Access Speed for Different Variables
- Local Variables are Faster than Class Variables
- Class Variables are Faster than Array Accesses
- Use Faster Types as Loop Indexes
- Use Native Methods
- Use Network Timeouts
- Buffer Network and File I/O
- Use Sockets Rather than URLs
- Use UDP
- Use Threads
- Use notify
- Use Synchronization Sparingly
- Keep Synchronized Methods Out of Loops
- Watch Out for the Mother Thread
- Counting Down May Be Faster than Counting Up
- Reduce the Number of Strings
- Use String Buffers or Arrays
- Watch Out for Slow Fonts
- Keep the Paint Method Small
- Double Buffer Where Possible for Smoother Graphics
- Use the Runtime to Do Error Checking for You
- Avoid Time Conversions
- Be Wary of RMI, EJBs, and CORBA
- Compilers
- -O
- Profile Your Code
- JVMPI
- Decompilers
- OS-Level Profiling Tools
- JITs
- Static Compilers
- Virtual Machines
- Runtime Options
- -verbosegc
- -noverify
- -Xmsn and -Xmxn
- Make Eden Big Enough
- -train
- Use Native Threads
- Use .jar Files
- Java Plug-In
- -start_ java
- Java Chips
- Java Benchmarks
- Problems with Benchmarks
- Web Sites with Java Performance Info
- Key Recommendations
- 22. Databases
- Do You Really Need a Relational Database?
- When You Need a Professional Database
- Alternatives
- Performance Tips
- Prepared Statements and Bind Variables
- Denormalize Tables
- Do Not Create Cursors in Loops
- Direct Connections
- Main Memory Databases
- Multiple Tiers
- Connection Pool Configuration
- Queries
- Indexes
- Row-Level Locking
- Combined Web Server/Databases
- How Many Connections Can Your Database Handle?
- When the Database Is Overloaded
- Analysis
- Key Recommendations
- Do You Really Need a Relational Database?
- 11. Browsers
- A. Web Performance Product Lists and Reviews
- Problems with Commercial Tools
- Monitoring Tools
- Load Generation Tools
- Preloaders
- Network Optimizers
- MTU Tuners
- Optimal Application Expert
- IP Traffic Management Products
- Content Compressors
- Condenser
- T/X 2100 Series from Redline Networks
- Hybrid Development Tools/Databases
- Java Profilers and Optimizers
- Caching Services
- Professional Services
- Load Balancers
- Modeling Tools
- Index
- About the Author
- Colophon
- Copyright