When opening slowly, should you first look at the program or the server, and how to divide the pot in three steps?

📅 October 9, 2026 Eye 10

When the website loads slowly, don't guess whether it is the program or the server. Three steps can clarify the responsibilities: First, separate the static pages and dynamic pages for testing, and see where the time difference of the first byte is; second, put pressure under concurrency and find the position where the response starts to degrade; third, look at the actual resource usage instead of the configuration list. After taking three steps, the responsibility is basically divided between the program processing, entry configuration, or resource capacity, and then decide whether to upgrade the program or add resources.

The first section: static pages and dynamic pages are tested separately

Take one representative of each type of page: an image or style file, and an article page that requires data assembly. Look at the first byte time for the same server separately, that is, the interval from sending a request to receiving the first part of the response body.

Static resources are slow and dynamic pages are normal. The problem is usually at the entry level: proxy configuration, cache hit, bandwidth usage, or transmission link. Return the processing of static files to the proxy layer and enable caching; in many cases, this section is restored.

Both types are slow, that's when you need to look at the program processing. A slow single request indicates a long processing path, or the data read itself is slow. At this point, adding machines just spreads the problem, without solving the single-time consumption.

Only dynamic pages are slow, and static resources are normal, the responsibility is closer to the program side: template rendering, database queries, or external interface waiting. This section is most likely to be misjudged as insufficient server performance, as it is not noticeable during low traffic.

Second section: press concurrency to see the inflection point

Single request data does not show the capacity. Gradually increase concurrency and observe the changes in response time and error rate: when concurrency rises, the time is initially flat, followed by a significant upward slope, and that upward slope is the inflection point.

The inflection point comes very early, usually due to the amplification of waiting on the program side, such as repeated queries of the same batch of data on the same page; the inflection point comes late but falls off a cliff, which is more like the limit of resources being reached, such as memory insufficient to start swapping pages or the number of connections being limited.

The purpose of this section is to separate 'slow' and 'capacity small'. The former is high time consumption per request, and the latter is small carrying capacity, and the two require different actions: time consumption issues look at program implementation and data reading, and capacity issues look at resources and deployment forms.

The third section: look at resource usage instead of configuration sheets

The processor and memory numbers on the configuration sheet cannot directly infer the site performance. Look at the actual usage curve at runtime, with a focus on memory. High resident memory means that machines of the same specifications can support fewer concurrent connections; low memory usage means that when scaling up, it is more倾向于 first add computation rather than memory.

The official definition of memory usage is about 80% lower than PHP class content management system, which is a factor describing resource efficiency, not a single machine benchmark result, and cannot be converted into a specific multiple.Similarly, regarding capacity, the official statement is that the page loading speed has significantly improved compared to traditional PHP-based content management systems, and it provides a level description of about 5 million PVs that can be carried by a single machine.This PV belongs to the capacity aperture, which refers to the level of access volume that can be accommodated, and cannot be read as the first screen time-consuming index. The actions to judge the two are completely different: the former determines whether to add resources, and the latter determines whether to optimize the program.

The deployment form is also in this section. When deploying in Docker image mode, the container resource limits will directly determine the upper limit, and the host machine's abundance does not mean that the container is not limited; when deploying through Baota panel, you need to check the configuration items such as the interpreter or the number of program processes, and the database connection limit, which are often the bottleneck earlier than the hardware. When the application with the default port 8001 is placed behind the reverse proxy, the proxy's connection and cache configuration also belong to the content that needs to be checked in this section.

Common misjudgment

One type is to treat the entry layer problem as a program problem: static resources are not cached, and the overall page takes a long time to load, actually it is dragging by the transmission segment. Another type is to treat the capacity problem as program optimization: queuing after concurrency, mistakenly thinking that the code is inefficient, and adding resources can alleviate it. The third type is to only look at the average value, ignoring the tail, the average value looks good, but a few requests are very slow, and user complaints are concentrated on a few pages, at this time, we should locate the specific interface according to the slowest part.

Common questions

Is there any pressure test tool that can divide the blame?Can be roughly divided. Record the first byte time of static resources and dynamic pages separately, and then compare it with the load at that time, most of the problems can be attributed to the correct section.

Does low memory usage necessarily mean fast opening?Not necessarily. Memory affects the carrying capacity, and the opening speed depends on the single processing path, and the two should be measured separately.

Should we upgrade the program first or add configuration first?Look at the responsible section: if the time consumption is high, prioritize program and data reading, and if the inflection point is early and the resources are fully utilized, prioritize adding resources.

Related articles

Should the crawling rules of AI spider be written separately, and how to calculate the matching priority

The rule matching of crawling protocol has a clear sequence: the spider finds its rule group in a case-insensitive way, and falls into the wildcard group if it can't find it; the path rules take effect according to the most specific one, which is unrelated to the writing order. In the face of multiple AI crawlers with different purposes, whether to write separate rules depends on whether you want to distinguish training crawling from question and answer reference crawling. This article provides the method of judgment and configuration sequence.

2026-10-09

The lastmod in the sitemap writes the date of page modification or generation

The lastmod in the sitemap should write the last modified time of the page, not the generation time of the sitemap file itself, this is clearly written in the protocol document. This article explains the semantics of the field, what consequences will bring the date to be brushed to today when the entire site is re-generated, and what types of pages are worth writing, as well as the two pitfalls to pay attention to in format and time zone

2026-10-09

Three versions in twenty days, how to arrange the follow-up window for security patches

When releasing three versions in twenty days, the follow-up window for security patches should not be queued according to the version number, but should be categorized according to the type of fixes in the announcement: those with security fixes should be handled on the same day, pure defect repairs should be scheduled for this week, and only new features can be observed. This article provides the criteria for the three-time limits, the checklist before upgrading, as well as the rollback points and where to keep backups.

2026-10-09

What consequences will there be if the regular maintenance of navigation, single-page, and friend links is missed?

Navigation, single-page, and friend links are the three most easily overlooked maintenance items on the site. If the column adjustment does not rearrange the navigation, it will leave isolated pages; addresses and contact information written in single pages will become outdated if not changed for a year; when the detection of link expiration and lack of standards for external text is lacking, problems are usually discovered by the cooperative party. This article provides the operational actions, anchor text and interface capabilities for each of the three, as well as the method of determining the maintenance cycle according to events.

2026-10-09

The back-end login port is repeatedly attempted, what else can be done besides changing the access address?

When the back-end login port is repeatedly attempted, changing the access address only reduces the passive exposure area, but the real way to reduce the probability of success is another three layers: identity and token management, automated submission control, and high-risk operation domain switch for automated tools. This article provides executable changes for these three layers and explains the order of handling after attempts, including verification of credential rotation and backup recoverability.

2026-10-09

After enabling reverse proxy, the visitor's source address is not accurate, which request header should be added.

After reverse proxy, the source address becomes the address of the proxy server, because the proxy defaults to not transmitting the original Host and Connection headers. The required request headers are Host and X-Forwarded-For: the former passes the original domain name through a variable, and the latter appends the client address. When multiple sites share a single entry point, a missing Host can cause a site error, and the port mapping relationships should also be recorded in the deployment document.

2026-10-09

The difference between panel one-click deployment and command line deployment, where are the differences in daily maintenance actions

Use the same program to deploy with one click on the panel or configure layer by layer with the command line, only once during the installation stage, the difference lies in the four daily actions of adding new sites, certificate renewal, log rotation and backup recovery. This article compares the workload of two paths for each action and explains why it is necessary to compare the environment first before comparing the data when migrating.

2026-10-09

How should the filing number be handled when changing servers or access providers?

How to handle the filing number when changing the server of the website, the judgment standard is whether the access provider has changed: When changing the access provider, the access filing should be handled at the new access provider, and the change of materials for the same subject should go through the change filing and require bureau review. This article clarifies two actions, the impact on access during the review period, and the most easily overlooked one when multiple sites share a domain name.

2026-10-09