简体   繁体   English

进行计算时,IIS网站的响应速度变慢

[英]IIS website slow in response when calculation in progress

I have an IIS website which connects to MySQL. 我有一个连接MySQL的IIS网站。 I have a link in the website which do the intensive calculation. 我在网站上有一个链接进行深入的计算。 When this link is triggered, it uses around 20% of CPU resource. 触发此链接后,它将占用大约20%的CPU资源。 Then, if I click other links, the other links are responding very slow. 然后,如果我单击其他链接,则其他链接的响应速度很慢。 Until the link that does calculation finished, then other links responding time will resume. 在计算链接完成之前,其他链接的响应时间将恢复。 I am curious why only 20% CPU is used, but the other links still respond slowly. 我很好奇为什么只使用20%的CPU,但是其他链接仍然响应缓慢。 It seems the calculation link occupies the CPU resource. 看来计算链接占用了CPU资源。 But isn't it different link are run in parallel, how it should be affected by intensive calculation of one link? 但是,不是不同的链接并行运行,一个链接的密集计算应如何影响它? How can I improve that, or should I tune something in IIS of my code? 我该如何改善它,还是应该在IIS代码中调整某些内容?

Increase the maximum number of worker processes in your IIS application pool for your website. 增加网站的IIS应用程序池中的辅助进程的最大数量。 This will enable the server handle multiple requests at the same time. 这将使服务器可以同时处理多个请求。 Below is how. 下面是如何。

  1. Open IIS Manager and Navigate to Application pools. 打开IIS管理器,然后导航到“应用程序池”。
  2. Right click the application pool for your website and select Advanced Settings. 右键单击您网站的应用程序池,然后选择“高级设置”。 在此处输入图片说明
  3. In the Advanced Settings Dialog Box under Process Model, change the value of maximum worker processes to 10. [You may enter another number (greater than or less than 10)] 1 is default and means only one worker process will be started to handle all your requests. 在“进程模型”下的“高级设置”对话框中,将最大工作进程的值更改为10。[您可以输入另一个数字(大于或小于10)]默认为1,这意味着将仅启动一个工作进程来处理所有工作进程。您的要求。 Meaning that only one request will be processed at a time. 意味着一次只处理一个请求。
  4. Click Ok to save your changes 单击确定保存更改 在此处输入图片说明
  5. Restart your application pool [Not mandatory but advised] 重新启动您的应用程序池[不是强制性的,但建议使用]
  6. Thats all. 就这样。 Your Website should now be able to process multiple requests at the same time 您的网站现在应该能够同时处理多个请求

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM