We developed an MVC 5 application in almost 2.5 years.
Initially , it was working good but as long as data was being increased. Application is stuck now.
We are trying to find the main reason but still couldn't be 100 percent successful.
we are curious about why it is being slower.
Server detail are:
Windows Server 2012
Sql server 2014 Web Edition
RAM -- 128 GB
Intel Xeon -- 10 Cores.
Disk I/O -- Not SSD (Disk I/O starts from 0 to 100% and very frequently 100%)
We are minimizing the CSS and JS plugins.
We are optimizing the sql queires and front-end logic (client side and server side)
We have deployed the MVC 5 with pre-compiled resource and release mode.
We have used caching with some views but caching works better only for some action views not all. In some cases, views are taking more time than actual time.
We have almost done many thing for increasing the performance yet 20/30 % performance was increased.
One more thing is Our database size is not too large and we are picking just one page (25 records). Size is 600MB to 700MB with 10 multiple physical files.
We have remove the Application request event from global.asax. Web.config only has debug = false.
Sometimes , Redirect takes 9 seconds and sometime 36 seconds.
Why ?
Database logic is simple and front-end as well.
I placed the same release on another server. Speed issue seems to be equal or similar.
I tried same logic with plain html and jquery and it worked like a bullet but same view is taking 5 to 9 seconds. This was a very simple view.
The usual culprit is poorly designed or missing table indexes. Next is poor performing quires. Next, is rendering.
Where is the majority of the time spent? Fetching records? Rendering the UI? The first step, IMHO, if figuring out where the bottle neck is then looking closer at the actual area affecting performance.
Poor performance may be related to many aspects, while the first thing you should do is finding out which part takes long time. You can use the
Network and Performance two panels of the f12 development tool to monitor
The Network panel is used to monitor, inspect and profile the requests and responses sent over the wire. With it you can:
Browse all the resource requestsmade by the page
Measure the load time of your site
Inspect the headers, message bodies, parameters, and cookiesexchanged between your page and the network
Identify the network events causing bottlenecksin the load time of your site
Set async as true will not slower the application, instead, in most cases asynchronous will make it faster. Processing your request asynchronously avoids the delay while the retrieval from the server takes place because your visitor can
continue to interact with the web page, the requested information will be processed in the background and the response will update the page as and when it arrives.
As for why a simple page has to be loaded for such a long time, I still suggest you use the tool to figure it out, it may be related to the Server, UI rendering and etc. as said above. What we said here are just our guess, you should first find the problem,
then we can help you solve it.
Best Regards,
Jiadong Meng
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com
None
0 Points
9 Posts
performance issue in MVC 5 application
Oct 23, 2019 07:27 PM|fdfdfdf|LINK
Hi,
We developed an MVC 5 application in almost 2.5 years.
Initially , it was working good but as long as data was being increased. Application is stuck now.
We are trying to find the main reason but still couldn't be 100 percent successful.
we are curious about why it is being slower.
Server detail are:
Windows Server 2012
Sql server 2014 Web Edition
RAM -- 128 GB
Intel Xeon -- 10 Cores.
Disk I/O -- Not SSD (Disk I/O starts from 0 to 100% and very frequently 100%)
We are minimizing the CSS and JS plugins.
We are optimizing the sql queires and front-end logic (client side and server side)
We have deployed the MVC 5 with pre-compiled resource and release mode.
We have used caching with some views but caching works better only for some action views not all. In some cases, views are taking more time than actual time.
We have almost done many thing for increasing the performance yet 20/30 % performance was increased.
One more thing is Our database size is not too large and we are picking just one page (25 records). Size is 600MB to 700MB with 10 multiple physical files.
We have remove the Application request event from global.asax. Web.config only has debug = false.
Sometimes , Redirect takes 9 seconds and sometime 36 seconds.
Why ?
Database logic is simple and front-end as well.
I placed the same release on another server. Speed issue seems to be equal or similar.
I tried same logic with plain html and jquery and it worked like a bullet but same view is taking 5 to 9 seconds. This was a very simple view.
Can anyone suggest us something better?
All-Star
43761 Points
18738 Posts
Re: performance issue in MVC 5 application
Oct 23, 2019 08:07 PM|mgebhard|LINK
The usual culprit is poorly designed or missing table indexes. Next is poor performing quires. Next, is rendering.
Where is the majority of the time spent? Fetching records? Rendering the UI? The first step, IMHO, if figuring out where the bottle neck is then looking closer at the actual area affecting performance.
Member
430 Points
160 Posts
Re: performance issue in MVC 5 application
Oct 24, 2019 06:29 AM|jiadongm|LINK
Hi fdfdfdf,
Poor performance may be related to many aspects, while the first thing you should do is finding out which part takes long time. You can use the Network and Performance two panels of the f12 development tool to monitor
The Network panel is used to monitor, inspect and profile the requests and responses sent over the wire. With it you can:
https://docs.microsoft.com/en-us/microsoft-edge/devtools-guide/network#request-details
The Performance panel offers tools for profiling and analyzing the responsiveness of your UI during the course of user interaction. With it, you can:
https://docs.microsoft.com/en-us/microsoft-edge/devtools-guide/performance
Best Regards,
Jiadong Meng
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com
None
0 Points
9 Posts
Re: performance issue in MVC 5 application
Oct 24, 2019 05:23 PM|fdfdfdf|LINK
thank you mgebhard and jiadongam.
Ok i try to check the indexes. Yes i think rendering the UI and redirects sometimes response quickly and sometime very late.
In some case, when i run the query in sql editor . it return the results quickly
Multiple consecutive Async (true) Ajax calls are initiated which are getting the views and other data. (almost 10 or more)
I am inspecting through browser network tab.
Why redirects takes unexpected time to load ?
Sometime quicker and sometimes longer.
One thing, i want to ask
If i load a view through ajax async (true) and server action only have a ActionResult return type.
Can it be a cause to slower the application ?
Another interesting thing is that a simple view is taking 5 to 9 seconds to load. view size in 24 to 36KB.
that view doesn't have any relation with database.
Member
430 Points
160 Posts
Re: performance issue in MVC 5 application
Oct 25, 2019 09:28 AM|jiadongm|LINK
Hi fdfdfdf,
Set async as true will not slower the application, instead, in most cases asynchronous will make it faster. Processing your request asynchronously avoids the delay while the retrieval from the server takes place because your visitor can continue to interact with the web page, the requested information will be processed in the background and the response will update the page as and when it arrives.
As for why a simple page has to be loaded for such a long time, I still suggest you use the tool to figure it out, it may be related to the Server, UI rendering and etc. as said above. What we said here are just our guess, you should first find the problem, then we can help you solve it.
Best Regards,
Jiadong Meng
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com