Security Gateway performance optimization is arguably one of the toughest challenges today. To deal with it, one needs to understand lots of moving bits and pieces related to technologies in questions, security features in use, system limitations and bottlenecks.
Fortunately, SecureKnowledge authors made a tremendous job in writing down practically everything you need to know about security gateway performance tuning in the article Best Practices - Security Gateway Performance.
This article describes the technological approach of dealing with gateway performance, existing limitations, best practices, initial and advanced diagnostics of ongoing issues, relevant commands and tools, and examples of using those.
It also has references to further read on the subject of gateway performance tuning.