I have a relatively weak server (dual core VM, 3GB memory) hosting a few web apps but there is only 2 with relatively high traffic: my custom web app and YAF each having about equal traffic. I noticed the CPU and memory usage is always high on the server. I decided to take down the YAF forum for a few minutes and see what happen. Oddly, the resource usage came down a lot (less than 15% vs 80+% before). By "resources", I specifically mean the CPU usage by process sql server and this process also used 2GB of memory (max memory for a 32-bit process).
I compiled YAF in debug mode to try to identify which part result in high database usage. I noticed that these 2 SP are not cached and hence constantly take up time each page refresh: yaf_forum_listread and yaf_message_getallthanks. See complete listing below.
Not sure what "listread" does but I think "getallthanks" can be cached for maybe 5 minutes? I really don't need up-to-date thanks list if it slow down the app. Anyone goet an idea on how to lower the resource usage? I tried not showing the date on the thanks but that doesn't help much.
Snapshot 1:
[dbo].[yaf_prov_getuser]: 0.003
[dbo].[yaf_smiley_listunique]: 0.009
[dbo].[yaf_forum_listread]: 0.421
[dbo].[yaf_forum_listread]: 0.003
[dbo].[yaf_forum_listread]: 0.005
[dbo].[yaf_forum_listread]: 0.145
[dbo].[yaf_forum_listread]: 0.002
[dbo].[yaf_forum_listread]: 0.002
[dbo].[yaf_forum_listread]: 0.012
[dbo].[yaf_topic_latest]: 0.011
[dbo].[yaf_active_stats]: 0.001
[dbo].[yaf_prov_getuser]: 0.002
Snapshot 2:
[dbo].[yaf_topic_info]: 0.000
[dbo].[yaf_forum_list]: 0.000
[dbo].[yaf_forum_listpath]: 0.000
[dbo].[yaf_post_list]: 0.025
[dbo].[yaf_message_getallthanks]: 0.732
[dbo].[yaf_message_gettextbyids]: 0.006
[dbo].[yaf_prov_getuser]: 0.002
[dbo].[yaf_buddy_list]: 0.001
[dbo].[yaf_active_listtopic]: 0.001
[dbo].[yaf_watchtopic_check]: 0.000
[dbo].[yaf_prov_getuser]: 0.003
[dbo].[yaf_active_list]: 0.002
Edited by user
13 years ago
|
Reason: SPOILER tag doesn't work on this version of YAF?