You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@archiva.apache.org by Erwin Mueller <er...@deventm.org> on 2012/05/29 10:18:17 UTC
Limit memory usage for Archiva
Hello,
how can I limit the memory usage for Archiva? I have only a 512MB RAM server
available, and Archiva is using 50% of the RAM.
I like to know how to set a hard limit on the RAM available for Archiva and
tips how I can minimize the RAM usage of Archiva.
I thought that the wrapper.conf can set a hard limit, but it's not working
(Archiva is using 514M virtual and 254M resources, but the limit is set to
256M). I added/changed in wrapper.conf:
wrapper.java.additional.7=-Xms256m
wrapper.java.additional.8=-Xmx256m
...
wrapper.java.initmemory=256
...
wrapper.java.maxmemory=256
Kind regards,
Erwin.
--
Erwin Mueller
http://www.mueller-public.de - My site;
http://www.global-scaling-institute.de/ - Global Scaling Institute GmbH;
http://www.anr-institute.com - Advanced Natural Research Institute GmbH;
Re: Limit memory usage for Archiva
Posted by Brett Porter <br...@apache.org>.
On 30/05/2012, at 1:03 PM, Erwin Mueller wrote:
> Thank you for your answers,
>
> So trimming down of Archiva is not an option? Is all indexing done in memory? I would think that the index is saved on disk and loaded on demand?
The indexing is done incrementally, but a full scan or frequent uploads does create a queue that will consume memory for a period of time, as do individual requests. If you have low traffic, you can probably get away with less and reduce the heap size, but the lower you go there's a chance that garbage collection will slow down normal operation. You can look at the system status page to see if your memory use is reaching the limit. You can still trim it down using the techniques I've described as well.
- Brett
--
Brett Porter
brett@apache.org
http://brettporter.wordpress.com/
http://au.linkedin.com/in/brettporter
http://twitter.com/brettporter
Re: Limit memory usage for Archiva
Posted by Erwin Mueller <er...@deventm.org>.
Thank you for your answers,
So trimming down of Archiva is not an option? Is all indexing done in memory? I would think that the index is saved on disk and loaded on demand?
----- "Brett Porter" <br...@apache.org> wrote:
> The "maxmemory" setting is -Xmx, which is just the heap size. The JVM
> allocates more memory than that, such as for the permgen and the
> stack.
>
> You might need to set the -XX:MaxPermSize parameter as well as the
> maxmemory. If you are on 64-bit, you can save some memory with
> -XX:+UseCompressedOops, or running in 32-bit mode.
>
> However, depending on the amount of traffic you expect to do and the
> amount of data it will process, you might want to dedicate that server
> to repository management. 512m is about the right amount to adequately
> process any indexing and scanning tasks without spending a lot of time
> garbage collecting.
>
> - Brett
>
> On 29/05/2012, at 8:03 PM, Olivier Lamy wrote:
>
> > Hi,
> >
> >
> > 2012/5/29 Erwin Mueller <er...@deventm.org>:
> >> Hello,
> >> how can I limit the memory usage for Archiva? I have only a 512MB
> RAM server
> >> available, and Archiva is using 50% of the RAM.
> >>
> >> I like to know how to set a hard limit on the RAM available for
> Archiva and
> >> tips how I can minimize the RAM usage of Archiva.
> >>
> >> I thought that the wrapper.conf can set a hard limit, but it's not
> working
> >> (Archiva is using 514M virtual and 254M resources, but the limit is
> set to
> >> 256M). I added/changed in wrapper.conf:
> >>
> >> wrapper.java.additional.7=-Xms256m
> >> wrapper.java.additional.8=-Xmx256m
> >> ...
> >> wrapper.java.initmemory=256
> >> ...
> >> wrapper.java.maxmemory=256
> >
> > Yup that's normally the setup to change.
> > Which version Archiva are you using ?
> > How do you take your figures on memory usage ?
> >
> >>
> >> Kind regards,
> >> Erwin.
> >>
> >> --
> >> Erwin Mueller
> >> http://www.mueller-public.de - My site;
> >> http://www.global-scaling-institute.de/ - Global Scaling Institute
> GmbH;
> >> http://www.anr-institute.com - Advanced Natural Research Institute
> GmbH;
> >
> >
> >
> > --
> > Olivier Lamy
> > Talend: http://coders.talend.com
> > http://twitter.com/olamy | http://linkedin.com/in/olamy
>
> --
> Brett Porter
> brett@apache.org
> http://brettporter.wordpress.com/
> http://au.linkedin.com/in/brettporter
> http://twitter.com/brettporter
--
Erwin Mueller, erwin.mueller@deventm.org
http://www.global-scaling-institute.de/
http://www.deventm.org
Re: Limit memory usage for Archiva
Posted by Brett Porter <br...@apache.org>.
The "maxmemory" setting is -Xmx, which is just the heap size. The JVM allocates more memory than that, such as for the permgen and the stack.
You might need to set the -XX:MaxPermSize parameter as well as the maxmemory. If you are on 64-bit, you can save some memory with -XX:+UseCompressedOops, or running in 32-bit mode.
However, depending on the amount of traffic you expect to do and the amount of data it will process, you might want to dedicate that server to repository management. 512m is about the right amount to adequately process any indexing and scanning tasks without spending a lot of time garbage collecting.
- Brett
On 29/05/2012, at 8:03 PM, Olivier Lamy wrote:
> Hi,
>
>
> 2012/5/29 Erwin Mueller <er...@deventm.org>:
>> Hello,
>> how can I limit the memory usage for Archiva? I have only a 512MB RAM server
>> available, and Archiva is using 50% of the RAM.
>>
>> I like to know how to set a hard limit on the RAM available for Archiva and
>> tips how I can minimize the RAM usage of Archiva.
>>
>> I thought that the wrapper.conf can set a hard limit, but it's not working
>> (Archiva is using 514M virtual and 254M resources, but the limit is set to
>> 256M). I added/changed in wrapper.conf:
>>
>> wrapper.java.additional.7=-Xms256m
>> wrapper.java.additional.8=-Xmx256m
>> ...
>> wrapper.java.initmemory=256
>> ...
>> wrapper.java.maxmemory=256
>
> Yup that's normally the setup to change.
> Which version Archiva are you using ?
> How do you take your figures on memory usage ?
>
>>
>> Kind regards,
>> Erwin.
>>
>> --
>> Erwin Mueller
>> http://www.mueller-public.de - My site;
>> http://www.global-scaling-institute.de/ - Global Scaling Institute GmbH;
>> http://www.anr-institute.com - Advanced Natural Research Institute GmbH;
>
>
>
> --
> Olivier Lamy
> Talend: http://coders.talend.com
> http://twitter.com/olamy | http://linkedin.com/in/olamy
--
Brett Porter
brett@apache.org
http://brettporter.wordpress.com/
http://au.linkedin.com/in/brettporter
http://twitter.com/brettporter
Re: Limit memory usage for Archiva
Posted by Olivier Lamy <ol...@apache.org>.
Hi,
2012/5/29 Erwin Mueller <er...@deventm.org>:
> Hello,
> how can I limit the memory usage for Archiva? I have only a 512MB RAM server
> available, and Archiva is using 50% of the RAM.
>
> I like to know how to set a hard limit on the RAM available for Archiva and
> tips how I can minimize the RAM usage of Archiva.
>
> I thought that the wrapper.conf can set a hard limit, but it's not working
> (Archiva is using 514M virtual and 254M resources, but the limit is set to
> 256M). I added/changed in wrapper.conf:
>
> wrapper.java.additional.7=-Xms256m
> wrapper.java.additional.8=-Xmx256m
> ...
> wrapper.java.initmemory=256
> ...
> wrapper.java.maxmemory=256
Yup that's normally the setup to change.
Which version Archiva are you using ?
How do you take your figures on memory usage ?
>
> Kind regards,
> Erwin.
>
> --
> Erwin Mueller
> http://www.mueller-public.de - My site;
> http://www.global-scaling-institute.de/ - Global Scaling Institute GmbH;
> http://www.anr-institute.com - Advanced Natural Research Institute GmbH;
--
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy