We often find that when the number of visits of the site is constantly rising, it is a happy thing, but I also found that the increase in visitors also brings the burden of the server, especially for the virtual host, now The virtual host provider on the network is mainly used by the CPU upper limit control. When the CPU of the server (webpage) exceeds a limit, the next visit will be rejected, which is really a booming website. A small blow, is there any way to improve overall performance?
First of all, I should check, what server procedures have led to serious waste of CPU resources, we find that waste typically happens in the operation of the document or the database is used by the ASP MDB (Access), Access The disadvantage is that when the open connection is opened, performance will drop, and if the simultaneous database access has reached 30 or more performance, it will bring severe CPU resource loss.
we suggest:
If the real-time update requirements of your website are not particularly high, it is recommended that you overwrite all the page of all access databases into static pages. - The method is to write files using FSO
If your update data is not a lot, you can consider using, Application, such as the total amount of goods, the current online number, this avoids frequent database access,
If you have a lot of data requirements to update the database, you can consider your buffer, the specific operation is, create, Application, first put your update data in an array, then place the array in Application, when a take The condition of the data can be implemented using a counter (more than how much data) or time (more time to take data), read the data to update the database.
Since the APPLICATION operation is in memory, it is very small for the CPU's loss time, just occupying part of the memory space (until now, I have not heard which service provider has restrictions on memory, haha, organic multiplication ~~)
However, it should also be noted that there is not enough when using Application, when reading or modifying Application (putting data into arrays) and operates the database, the error will generate errors, because Application can be locked is that the modification cannot lock read, but this error basics Small, knowing that the function of the CPU is still very strong; the second is to use buffers to use the buffer only to some unimported data, and important data should be directly operating directly, because when the server restarts, Application is not. In order to improve server performance, service providers will restart IIS many times in the day, such, only to prepare, or to process when Application_end (this is good)