LLM Prompts

Performance Bottleneck Analyzer and Solution Generator

Identifies performance bottlenecks in a system and suggests optimization strategies.

The method

Use in ChatGPT or Gemini. Provide a detailed description of your system's architecture, workload, and performance metrics (CPU usage, memory usage, latency). Be specific about the application stack. Paste the generated performance bottlenecks and potential solutions into your analysis.

The prompts

Prompt 1
Analyze the following system description and identify potential performance bottlenecks. The system is a microservices-based e-commerce platform built using Python (Flask) and Go, with a PostgreSQL database. Key microservices include product catalog, order management, user authentication, and payment processing. The system experiences high traffic during peak hours (10 AM - 2 PM and 6 PM - 9 PM), with frequent database queries and API calls. Current CPU usage averages 70% during peak hours, with occasional spikes to 95%. Memory usage is consistently high at 80%. Latency for API calls averages 200ms, with some calls exceeding 500ms. The database server shows high read/write activity and occasional locking issues. Suggest specific, actionable steps to address these bottlenecks, focusing on code optimization, infrastructure improvements, and database tuning.
Prompt 2
You are a performance engineering expert. I need your help in identifying performance issues in my Java application. The application is a REST API built with Spring Boot, serving customer data. It uses a MySQL database. The application is deployed on AWS EC2 instances behind a load balancer. When the number of concurrent users increases, the response time of the API increases significantly, leading to a poor user experience. I've collected some performance metrics. The CPU utilization of the EC2 instances reaches 100% during peak load. Memory consumption is around 70%. Database query execution time is high, especially for complex queries involving multiple joins. Garbage collection is happening frequently. Analyze the above information and list potential causes of the performance problems and suggest solutions on how to improve the performance of the API.