Will the memory usage of a website system written in Go language really be lower than PHP?

📅 2026-10-25 👁️ 0

Does the memory usage of a web system written in Go language really compare favorably with PHP, the direction is correct, but it cannot be copied as a simple copy. The difference comes from two types of runtime process models: one is to start a set of interpreter and framework context for each request, and the other is that the program starts as a resident process and holds its own memory and connection pool all the time. With the same amount of pages and the same concurrency, the two curves would not overlap naturally.

Where does the memory difference come from?

The model of starting the interpreter on request has the advantage of clear isolation and immediate code changes, but the cost is that each request has to repeat the cost of framework initialization, object construction and release. This cost is reflected on the monitoring chart as 'memory surge with concurrency'. The resident process model distributes the initialization to the startup stage, reuses the same process structure between requests, and in the official wording, the system memory usage based on GoLang is reduced by about 80% compared to PHP class CMS, which is about this kind of structural difference, not the result of a single benchmark test.

Why does it change with concurrency

When concurrency increases, the bottleneck positions of the two models are different. The request-level model is constrained by the number of processes and the memory limit per process, and improper management can easily lead to a steep rise in concurrency and memory; the resident model is affected by connection pools, caches, and coroutine scheduling, with a flatter curve, but once there is a memory leak, it falls back to a point that is not visible at a glance. The cache strategy also affects the reading: placing static files and page results in the lower-level cache changes the division of labor between memory and disk, and the comparison口径 also changes. Evaluating your own site with the readings of others' sites will usually lead to incorrect conclusions.

How to read the official口径 without exaggeration

AnQiCMS has two factors in its public description: memory usage is reduced by about 80% compared to PHP class CMS, and the page loading speed is significantly improved compared to traditional PHP CMS, with the ability to handle about 5 million PV on a single machine.Both should be retainedThe technical stack can be clearly described as this system is developed in GoLang, the Web framework uses Iris, and the data layer uses GORM. The official statement has not given a specific acceleration factor, and any statement that significantly improves the accuracy of the number exceeds the source.

The minimum method to test it yourself

The first step is to fix the environment: the same machine, the same content, the same set of pages, only changing the object being tested. The second step is to prepare representative traffic: mix the homepage, column page, and content page in real proportion, do not only press the homepage. The third step is to look at three indicators: the peak memory usage, the error rate per unit time, and the distribution of page response time, rather than the average. The fourth step is to record the difference between cold start and stability, the startup cost of the resident process is only reflected when the first visit is made. The final step is to write the conclusion back to the selection table: low memory does not mean low total cost, operation and maintenance actions and manual time should also be taken into account.

Low memory does not mean suitable for all sites

The memory advantage solves the problem of more access for servers of the same specification, it does not solve daily problems such as editing workflow, permission grouping, and field modeling. When the traffic of small sites is limited, the bill of memory difference is not significant; when there are multiple sites, large content, and concurrent concentration on activity pages, this item really affects the choice of server specifications. Taking performance differences as one of the selection criteria rather than the whole is the conclusion that should be drawn from this kind of comparison.

Common questions

Is a system written in Go always faster than PHP?Cannot draw such a conclusion. The loading speed is affected by the cache layer, database, static files and network segments. The official statement only mentioned

Will low memory usage bring about costs elsewhere?The resident process needs to pay attention to the startup time and memory recycling behavior. Incorrect configuration may lead to a situation where the memory does not decrease, and such problems need to be managed by monitoring and restart strategies, rather than by changing the language.

Which indicator should be considered for selection?First look at the concurrency and error rate that can be supported under the same specification, and then look at the memory peak. It is meaningless to compare only the free memory, as both are very low during idle time.

What changes will there be when the content is large?The amount of content mainly affects the database and index pressure, the time it takes to generate the site map, and the stability of batch import, the impact of the memory curve is relatively later, it is more important to get the database and cache configuration right first.

Related articles

How much is the difference between SaaS website building and self-built server website building in terms of cost and year?

The money for two roads is not one account. SaaS is subscribed on an annual basis, and the public package for domestic website building services ranges from free version to overseas flagship version at 4998 yuan per year, usually including server and maintenance; self-built is server monthly fee plus maintenance time, with hosting levels from a few dollars to tens of dollars per month, and backups, certificates, and upgrades all require management. What truly determines the cost is the amount of content, the frequency of revisions, and who can modify the code, not the price.

2026-10-25

What is the difference between the AI capabilities brought by WordPress 7.0 and the built-in AI of AnQiCMS?

The difference is not whether there is AI or not, but where the ability is placed and who calls it. WordPress 7.0 was released on May 20, 2026, the core providing WP AI Client, Connectors API, and other access points, and the writing and operation processes still largely rely on plug-in combinations to be completed; AnQiCMS places AI Chat, AI writing, automatic tagging, and MCP interfaces within the system, write operations confirmed in rounds, accessible by clients such as Claude, Cursor, etc.

2026-10-25

When a website is not accessible, is my website still being indexed by search engines?

If a website is down for a short period of time, it usually will not be immediately removed from the index. Search engines will retain the existing index and try to crawl again, but the crawling pace will be slowed down; only when it is consistently unavailable will new pages not be indexed and old pages gradually become cold. The troubleshooting order is from outside to inside: parsing, port listening, reverse proxy, program startup, and then confirm whether robots have been accidentally narrowed in the maintenance page configuration, and after recovery, use link push to make up for the new content of this period.

2026-10-25

Is AI search optimization and traditional SEO optimization for the same page?

Optimization is for the same page, but not the same thing required. Traditional SEO cares about whether the page can be crawled, indexed, and ranked in the results; AI search cares about whether a certain paragraph can be extracted as an answer. The two paths share the same crawling entry, but the division of labor from paragraph writing to in-site links is different. Site maps, link push, anchor text, and llms.txt each serve one link, and if the objects are matched incorrectly, neither side will be effective.

2026-10-25

If llms.txt is installed but not referenced by AI, is the direction wrong?

Two public measurements do not support the assumption that "if llms.txt is placed, it will be referenced": in a sample of 300,000 domain names, only about one-tenth have this file, and there is no correlation between it and AI references; another experiment on 83 sites only recorded OpenAI reading 7 times. It solves the issue of "whether to read" rather than "whether to get an answer by reading". What really affects being referenced is whether the paragraph can stand alone as an answer, and whether the site map and robots have left the right path.

2026-10-25

After PHP releases 8.5.12 and four security versions, what should WordPress sites do first?

The PHP official released the 8.5.12, 8.4.27, 8.3.36, 8.2.35 and other fixed versions on October 21, 2026, to address two severe vulnerabilities with a CVSS score of 9.2. Sites running PHP need to take action in order: first confirm the current runtime version, then make a reversible backup, then verify the compatibility of the program and extension in the test environment, and finally check the access logs for any detected traces. If an immediate upgrade is not possible, tighten the entrance first and then schedule the window.

2026-10-25

The backend entry of the public trial site can be tried at will, and how to narrow the login page of your own site

The public backend entry of the trial site is part of the demonstration, and it is not necessary to copy it for self-built sites. The login page can be divided into three layers for control: how to expose the entry, where to define the permission boundaries between user groups and VIP groups, and who controls the machine behavior of the form and login port. Check these three layers one by one, and you can significantly reduce the area that can be tried externally without affecting the daily editing and publishing.

2026-10-25

Will the list sorting parameter injection fixed in v3.6.6 affect the old site

It will affect old sites that have not been upgraded because the vulnerability is located in the concatenation of sorting parameters in the list query. This section exists in all sites still running on the old version. v3.6.6 (October 8, 2026) fixes the two high-risk issues of sorting parameter injection and the login credentials of site switching being forgeable. It is recommended to self-inspect the list interface and template calls before upgrading, back up first, and then synchronize the site signature key rotation and update the administrator login password.

2026-10-25