[JBossCache] - Clustered-cache memory utilization issues
by gshriki
Hi there,
I?m experiencing some wired behavior in the JBoss Cache, regarding its memory management.
Please have a look on the following scenario:
1. Machine A creates a cache (a-sync mode).
2. Machine A creates 50,000 objects (Each ? 1K).
3. Machine B joins the cache.
4. Machine A puts all 50,000 objects to the cache.
5. Machine B gets all nodes to its local memory.
6. Kill the application on machine B ().
7. Machine B start the application again, and joins the cluster.
8. Kill the application on machine B ().
9. Machine B start the application again, and joins the cluster.
10. Kill the application on machine B ().
11. Machine B start the application again, and joins the cluster.
12. Kill the application on machine B ().
13. Machine B start the application again, and joins the cluster.
For each step, I?ve measured the time (in MS) and the memory utilization.
Some of the results:
Average time to insert the nodes (by machine A) - 19,842.60 ms
Average time to recieve all the nodes (by machine B) - 30,673.60 ms
Average time to machine B to start (with loading all the cache data) - 18,954.50 ms
Average memory usage to empty cache - 87.11 mb
Average memory usage by objects (not in the cache) - 198.40 mb
Average memory on machine A after step 5 - 550.40 mb
Average memory on machine B after getting all data - 400.40 mb
Average memory on machine A after step 7- 859.40 mb
Average memory on machine A after step 8- 908.20 mb
Average memory on machine A after step 11- 926.20 mb
Average memory on machine A after step 13- 931.00 mb
So my issues:
It appears that each time machine B restarts, the memory utilization on machine A gets higher?
Mainly I?m concern about the first time machine B stops and restarts. It takes the memory utilization on machine A from 550.40mb to 859.4mb?
Another issue is the time that machine B takes to load all cache? ~19 sec. Is that what I need to expect?
BTW, I?m using twi machine, both with Linux Red-Had Advance server 3 rc5. I'm using the top command to monitor the memory utilization for the processes.
Thanks,
Gilad.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3988776#3988776
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3988776
19Â years, 5Â months
[JBoss Portal] - SetRenderingParameter to renderer method dont work :( or i m
by J0Ke
i want just to show one text when submit a form ..
i try this with dispatcher and 2 jsps but dont work so i try the easy version but dont work too.
public class TestPortletAction extends GenericPortlet
{
public class TestPortletAction extends GenericPortlet
{
response.setRenderParameter("secound","sec"); //hard coded value
} protected void doDispatch(RenderRequest request, RenderResponse response) throws PortletException, IOException
{
// Do nothing if window state is minimized.
WindowState state = request.getWindowState();
if (state.equals(WindowState.MINIMIZED))
{
super.doDispatch(request, response);
return;
}
// Get the content type for the response.
String contentType = request.getResponseContentType();
response.setContentType(contentType);
// Get the requested portlet mode.
PortletMode mode = request.getPortletMode();
// Dispatch based on content type and portlet mode.
if (contentType.equals("text/html"))
{
if (mode.equals(PortletMode.VIEW))
{
doViewHtml(request, response);
return;
}
else
{
super.doDispatch(request, response);
}
}
else
{
super.doDispatch(request, response);
}
}
private void doViewHtml(RenderRequest request, RenderResponse response) throws PortletException, IOException
{
// To do: markup the required content.
PortletURL submitUrl = response.createActionURL();
PrintWriter out = response.getWriter();
String secound="none";
out.print("Welcome");
out.print(", this is the view mode.");
out.println("");
out.println("<form method='POST' action='" + submitUrl + "'>");
out.println("");
out.println("vavedi neshto:");
out.println("<input type='text' name='secound' value='" + secound + "'>");
out.println("");
out.println("<input type='submit'");
out.println("");
String sec=(String)request.getAttribute("secound");
if(sec !=null )
{
out.println("SEC IS NOT NULL ! : "+sec ); //i never see this :)
}
}
so as you gues the request.getAttribute("secound"); is aways NULL ..
why ?
i try to set the request parameter on processAction too
response.setRenderParameter("secound","sec");
request.setAttribute("secound","sec");
but the secound is null again
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3988770#3988770
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3988770
19Â years, 5Â months