[MAGNOLIA-8246] Decoration impacts performance due to interaction with JackRabbit Created: 09/Dec/21  Updated: 01/Feb/24

Status: Selected
Project: Magnolia
Component/s: resource-loader
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Federico Grilli Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: dx-core-6.3
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File decoration-woes-2.png    
Issue Links:
relation
is related to MGNLADVCACHE-114 PersonalizedCachePolicy impacts perfo... Selected
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Documentation update required:
Yes
Epic Link: Throughput improvements
Work Started:

 Description   

Seen recently while profiling dx-core 6.2.14-SNAPSHOT (as configured out of the box) under heavy load with
$ wrk -c200 -t200 -d600s --timeout 20s --latency --header "User-Agent: wrk" http://localhost:8080/magnoliaPublic/travel.htm.

Decoration involves checking for a resource's last modified date/time. This causes multiple threads to try and log to JR via its user manager and wait (JR's user manager uses a single synchronised session to manage log in credentials, see org.apache.jackrabbit.core.security.user.UserManagerImpl#session).

Possibly mitigate the issue by checking last modified every n seconds instead of each request? 

(If you're wondering who's triggering the topmost result (16.8% - ~23s), that's PersonalizedCachePolicy#shouldCache)


Generated at Mon Feb 12 04:30:58 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.