The Devel module provides a set of developer UI tools and code hooks to analyze performance. It also includes a Performance Logging tool to measure PHP's RAM usage per Drupal page.
Note: use Devel on development sites, not on production environments. This module is of course a resource hog and should not be active all the time. You may temporarily use it on live sites to identify problems of course.
- Identify slow database queries
- Identify slow PHP functions
- Identify Drupal page RAM consumptions