What does performance mean?

Tram Ho

What does performance mean?

Performance is the speed at which a request is responded to. For example in a Web application (client-server format), when there is a request to the server, how quickly the server will respond with a response (eg 1ms, 10ms,.. for a request) is considered performance. of the system.

Hệ thống đơn giản
Picture of a simple system

The cause of the performance problem

  • The bottleneck at the processing queues (queue network, queue in OS, queue IO in database,…)
    • Database
      • Because writing the query is not effective
      • Creating database schema is not good
    • Application layer
      • Slow processing algorithm
      • Inefficient use of data structures
  • Multithreading has not been applied
  • Limited hardware (eg using Disk HDD to read and write files instead of SSD)

So the system upgrade principle:

  • Increase efficiency at the following points:
    • Use resources effectively (for example, manage memory well, use HTTP2 instead of HTTP1.1, …)
    • Write logic (algorithms), queries at the application and database layer effectively.
    • Use logical data structures and schemas. For example, if the business design is good, instead of creating 10 tables, just create 5 tables and so the query is also simpler and faster.
    • Use cache if possible. For example cache at client side, server side, database.
  • Multithreading instead of sequential processing.
  • Increase hardware capabilities. Many times the system is fine, but because the hardware is too hard, it reduces performance.

So our optimal goal is làm sao để tăng tốc độ đáp ứng của một request ie we are reducing latency. And how to tăng throughput of the system ie increase the request processing capacity of the system for example the system can handle 1000 requests/1s now we tune to 10000/1s.

(to be continued…)

Share the news now

Source : Viblo