Well actually I haven't :-) My localizer gets quite large, but it hasnt made
any problems, yet .
You see when the localizer wants to find the resource value for a specific
key, it caches the result into the localizer. Now if your component has a
deep hierarchy, the generated key will be quite large. In yourkit , use the
object explorer to explore the ConcurrentHashMap entries and see why are
they so large, as I think the number of entries in the cache is limited, So
the only explanation would be to see why are the key/values taking so much
space. If you can give a dump of one of the bigger key/values we can help
more.
Also the DiskPageStore doesnt hold on to anything in memory, so it wont
consume any memory, nothing strange about it.

Iman

On Mon, May 12, 2008 at 9:31 AM, Quan Zhou <[EMAIL PROTECTED]> wrote:

> Thanks for your all replys.
>
> I review the dump file with both SAP MemoryAnalyzer and YourKit
> They all show the same hierachy as follows:
>
> -org.apache.wicket.settings.Settings
>  - org.apache.wicket.Localizer
>  - org.apache.wicket.util.concurrent.ConcurrentHashMap
>   - org.apache.wicket.util.concurrent.ConcurrentHashMap$Entry
>
> Localizer Object retaind 87.84% HeapSize. while the DiskPageStore only
> retained 0.71%
> That's weird,isn't it?
>
> I decrease the max heapsize settings to 50M, and make a load test then
> monitor the memory allocation.
> It indeed allocated more and more char[] objects time by time.
>
> Iman,how do you solve your problem at last?
> could you share some experience with me ? Thank you very much.
>
> 2008/5/10 Iman Rahmatizadeh <[EMAIL PROTECTED]>:
>
> > I've seen this before, altough it wasnt 2GB, but in a small 70MB heap
> dump
> > the cache size was around 25MB. The ConcurrentHashMap caches a lot of
> > unneeded string keys, where the keys are quite large, maybe strings of
> size
> > 1k characters, like  key :
> >
> >
> "org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable$1:rows-ir.co.meraat.avicenna.web.components.AvicennaDataTable$InnerDataTable:inner-table-ir.co.meraat.avicenna.web.components.AvicennaDataTable$1:filter-form-ir.co.meraat.avicenna.web.components.AvicennaDataTable:table-ir.co.meraat.avicenna.vita.GradesManagementPanel$1:studentSearch-ir.co.meraat.avicenna.vita.GradesManagementPanel:componentId-ir.co.meraat.avicenna.web.CompositePage:5-fa_IR-nullg.apache.wicket.markup.repeater.OddEvenItem:29-...."
> >
> > As you see the component hierarchy is dumped into the string, making it
> > very
> > large. I guess we're both localizing a lot of strings, so our problem
> could
> > be the same.
> >
> > Iman
> >
> > On Sat, May 10, 2008 at 9:38 AM, Johan Compagner <[EMAIL PROTECTED]>
> > wrote:
> >
> > > Can you really see what it holds?
> > > Almost 2G in memory in localizer is extreme... Thats really a lot of
> > > strings..
> > > You could try to read that dump with yourkit if your current one
> > > doesnt show enough.
> > >
> > > On 5/9/08, Quan Zhou <[EMAIL PROTECTED]> wrote:
> > > > Hello everyone.
> > > >
> > > > I recently develop my App use Wicket1.3.3. It's my first time to use
> > this
> > > > framework and I feel it's really really a perfect framework for me.
> > > > My app support both Simplified Chinese , Traditional Chinese, I
> > implement
> > > > this with Wicket i18n feature.
> > > > With the load increasing these days, I found my app would become
> very
> > lag
> > > > abount every 24 hours ,so that i would only restart it
> > > > without any choice.
> > > > when I found the lag, My log records many Exceptions like :
> > > > "after 1 minute the Pagemap null is still locked by:
> > > > Thread[http-8080-321,5,main], giving
> > > > up trying to get the page for path xxx"
> > > >
> > > > I check the JVM status with jstat -gc , It tells that the Heapsize
> is
> > > full
> > > > even after full GC.
> > > > My VM paraemter is "-Xms2000m -Xmx2000m -XX:MaxNewSize=250m
> > > > -XX:MaxPermSize=250m"
> > > > My deploy server has 2*CPU and 4G memory, Redhat AS4 OS + tomcat
> 6.0.
> > > > There're 2000 sessions on the day while the timeout threshold is 15
> > > minutes.
> > > > So i dump the whole heapsize with the command " jmap
> > > > -dump:live,format=b,file=3.dump.hprof processid"
> > > > and i truely get a 2G size dump files. I use SAP Memory Analyer to
> see
> > > > what're stored in HeapMemory.
> > > > and I found a strange number of Retained Heap usage:
> > > > Classname
> > > >                              ShallowHeap
> RetainHeap
> > > >                           RetainedHeap%
> > > > [EMAIL PROTECTED]
> > > >                             16
> > > > 1,755,070,352                            87.64%
> > > >  [EMAIL PROTECTED]
> > > > 48                     1,755,070,336
>  87.69%
> > > >   [EMAIL PROTECTED]
> > > >          33,554,448
> > > >                      1,755,069,632                       87.69%
> > > >    -  [EMAIL PROTECTED]
> > ...
> > > >        24                                   3928
> > > >         0.00%
> > > >    -  [EMAIL PROTECTED]
> > ...
> > > >        24                                   3928
> > > >         0.00%
> > > >    -  [EMAIL PROTECTED]
> > ...
> > > >        24                                   3928
> > > >         0.00%
> > > >    -  [EMAIL PROTECTED]
> > ...
> > > >        24                                   3928
> > > >         0.00%
> > > >    -  [EMAIL PROTECTED]
> > ...
> > > >        24                                   3928
> > > >         0.00%
> > > >    -  [EMAIL PROTECTED]
> > ...
> > > >        24                                   3928
> > > >         0.00%
> > > >   + 2,863,659 more...
> > > >
> > > > Is that means that the Localizer Object used most of the heap size?
> > > > or Is this number normal for Wicket App?
> > > >
> > > > I wonder whether I forget to release the memory by my mis-using of
> i18n
> > > > feature?
> > > > Is there any attentions I must pay to when dealing with Localizer?
> > > >
> > > > This problem annoys me more the 2 weeks. I really need some help.
> > Thanks
> > > .
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
>

Reply via email to