
|
If you were logged in you would be able to see more operations.
|
|
|
uPortal
Created: 13/Nov/04 07:29 AM
Updated: 03/Jul/07 04:10 PM
|
|
| Component/s: |
Framework
|
| Affects Version/s: |
2.4.1
|
| Fix Version/s: |
2.4.2
|
|
|
Original Estimate:
|
Unknown
|
Remaining Estimate:
|
Unknown
|
Time Spent:
|
Unknown
|
|
Environment:
|
Operating System: All
Platform: All
Operating System: All
Platform: All
|
|
|
William G. Thompson, Jr. wrote:
> Folks,
>
> I would appreciate any comment/thoughts/etc on the following:
>
> 1) RU is using 2.3.3+ uPortal and like others we are experiencing a
> chronic memory leak
>
>
> 2) As noted early on the list 2.3.3 PersonDirectory has a memory leak
> resulting from the use of a WeakHashMap to cache IPersons
>
>
> 3) The expected (broken) behavior is that as users login an entry is
> added to the WeakHashMap that is never able to be garbage collect
> since the:
> Value (IPerson)
> has a hard references to the
> Key (person.getAttribute(IPerson.USERNAME)
>
>
> 4) this would mean that for sites that have 30,000+ registered users
> this Map could grow to 30,000+ entries at max and would never go down
> (until the JVM is bounced) (anyone have a estimate on the size of
> IPerson?)
>
> Does this sound right?
>
> 5) I am considering simply removing the WeakHashMap altogether with the
> understanding that the only downside is the
> PersonDirectory.getRestrictedPerson(String uid) will have to query the
> data store each time it is invoked.
>
> Am I missing anything other downside/implication?
>
> Thanks for your thoughts.
>
> Cheers,
> Bill
Bill,
Please try replacing WeakHashMap with
org.jasig.portal.utils.WeakValueMap from uP3 sandbox code. That
implementation is tested and should do what was originally indented for
the PersonDir caching.
-peter.
|
|
Description
|
William G. Thompson, Jr. wrote:
> Folks,
>
> I would appreciate any comment/thoughts/etc on the following:
>
> 1) RU is using 2.3.3+ uPortal and like others we are experiencing a
> chronic memory leak
>
>
> 2) As noted early on the list 2.3.3 PersonDirectory has a memory leak
> resulting from the use of a WeakHashMap to cache IPersons
>
>
> 3) The expected (broken) behavior is that as users login an entry is
> added to the WeakHashMap that is never able to be garbage collect
> since the:
> Value (IPerson)
> has a hard references to the
> Key (person.getAttribute(IPerson.USERNAME)
>
>
> 4) this would mean that for sites that have 30,000+ registered users
> this Map could grow to 30,000+ entries at max and would never go down
> (until the JVM is bounced) (anyone have a estimate on the size of
> IPerson?)
>
> Does this sound right?
>
> 5) I am considering simply removing the WeakHashMap altogether with the
> understanding that the only downside is the
> PersonDirectory.getRestrictedPerson(String uid) will have to query the
> data store each time it is invoked.
>
> Am I missing anything other downside/implication?
>
> Thanks for your thoughts.
>
> Cheers,
> Bill
Bill,
Please try replacing WeakHashMap with
org.jasig.portal.utils.WeakValueMap from uP3 sandbox code. That
implementation is tested and should do what was originally indented for
the PersonDir caching.
-peter. |
Show » |
|
Bill Thompson: [
Andrew, do you want to take up Bug 1787 (PersonDirectory)? You're probably in
the best position at this point to nail it.
]
My response:
Will do. I'll be able to get to this [today].
I plan on going with the proposal to eliminate PersonDirectory IPerson caching
entirely under the theory that this will eliminate (part of) the memory leak
biting Rutgers and (at least part of) the less-than-fully-dynamic user grouping
under PAGS biting the dynamic-PAGS schools.
We can go from that "known-good" state in figuring out whether the loss of
caching introduces unacceptable PersonDirectory performance or whether it's more
than good enough as a baseline to which caching-inclined uPortal adoptors can
re-introduce caching in keeping with where each adoptor specifically wants to be
on the performance/dynamicness/memory conservation trade-off curve.