Hotfix release available: 2025-05-14b "Librarian". upgrade now! [56.2] (what's this?)
Hotfix release available: 2025-05-14a "Librarian". upgrade now! [56.1] (what's this?)
New release available: 2025-05-14 "Librarian". upgrade now! [56] (what's this?)
Hotfix release available: 2024-02-06b "Kaos". upgrade now! [55.2] (what's this?)
Hotfix release available: 2024-02-06a "Kaos". upgrade now! [55.1] (what's this?)
New release available: 2024-02-06 "Kaos". upgrade now! [55] (what's this?)
Hotfix release available: 2023-04-04b "Jack Jackrum". upgrade now! [54.2] (what's this?)
Hotfix release available: 2023-04-04a "Jack Jackrum". upgrade now! [54.1] (what's this?)
New release available: 2023-04-04 "Jack Jackrum". upgrade now! [54] (what's this?)
Hotfix release available: 2022-07-31b "Igor". upgrade now! [53.1] (what's this?)
Hotfix release available: 2022-07-31a "Igor". upgrade now! [53] (what's this?)
New release available: 2022-07-31 "Igor". upgrade now! [52.2] (what's this?)
New release candidate 2 available: rc2022-06-26 "Igor". upgrade now! [52.1] (what's this?)
New release candidate available: 2022-06-26 "Igor". upgrade now! [52] (what's this?)
Hotfix release available: 2020-07-29a "Hogfather". upgrade now! [51.4] (what's this?)
New release available: 2020-07-29 "Hogfather". upgrade now! [51.3] (what's this?)
New release candidate 3 available: 2020-06-09 "Hogfather". upgrade now! [51.2] (what's this?)
New release candidate 2 available: 2020-06-01 "Hogfather". upgrade now! [51.1] (what's this?)
New release candidate available: 2020-06-01 "Hogfather". upgrade now! [51] (what's this?)
Hotfix release available: 2018-04-22c "Greebo". upgrade now! [50.3] (what's this?)
Hotfix release available: 2018-04-22b "Greebo". upgrade now! [50.2] (what's this?)
slow_view_rendering_consistently_after_every_few_requests

Slow View Rendering consistently once in every few Requests

Cause and Discussion

This is happening on every environment including local. The partials which seemed to have taken time to load, did not have any loops or queries so this is not a direct code issue.

This seems to be ruby garbage collector issue. On dev01, did some log statements to print the garbage collector time after enabling garbage collection stats. The extra time while rendering seems to be taken by the garbage collector. Observed this by enabling the garbage collection stats in REE and printing the value of GC.time(http://www.rubyenterpriseedition.com/documentation.html#_garbage_collector_statistics). Every time when this extra amount of time is taken, CPU usage spikes up as garbage collector runs.

Possible Fixes

a) Performance tuning GC (In progress) -

We should figure out optimal GC related settings for the app. Tried this by following instructions here - http://technology.customink.com/blog/2012/03/16/simple-garbage-collection-tuning-for-rails/ . The frequency of the late responses is reduced but still seeing the late responses. Will need to spend more time.

Work to be done

b) Upgrade to use KIji REE or ruby 2.0 (To be discussed after (a) )-

slow_view_rendering_consistently_after_every_few_requests.txt · Last modified: 2018/08/31 16:16 (external edit)