Rake task memory out of control?

Greetings,
I am collecting a few trends in foreman using host facts. I'm using a
cron entry for the foreman user: /usr/sbin/foreman-rake trends:counter
every half hour.

My foreman machine is running puppet, puppetdb, foreman, foreman-proxy, and
postgres, 2 vCPU and 6GB of RAM. It seems that the rake commands are
running away with all the memory and swap. Is there a way to control this?

Here's what top shows currently:

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND

30002 foreman 20 0 6602m 3.3g 104 D 13.3 58.3 17:06.22
/opt/rh/ruby193/root/usr/bin/ruby /opt/rh/ruby193/root/usr/bin/rake
trends:clean

Seems like a lot of RAM and accumulated CPU time. I can add more RAM, but
other than rake commands like this one, the server doesn't seem to utilize
the memory allocated.

Any advice on managing ram usage with trends or thoughts on the economies
of scale related to using trends would be helpful.

Kind regards,
Sean

UPDATE:

Is anyone using Foreman Trends? I have a total of 114 hosts reporting to
Foreman, and this performance/resource issue seems a little beyond
reasonable for such a small environment. I'm only collecting trends on 5
facts.

After posting the message last week, I added 2GB of RAM to the server, and
I still find that the system is eating deeply into swap. This morning the
trends:clean rake task had 5.5GB of RAM resident, top reports it consuming
67% of the memory.

What can I do to provide better information about what's going on inside
this rake task for debug purposes?

Thanks.

··· On Monday, April 14, 2014 10:07:39 AM UTC-4, Sean Alderman wrote: > > Greetings, > I am collecting a few trends in foreman using host facts. I'm using a > cron entry for the foreman user: /usr/sbin/foreman-rake trends:counter > every half hour. > > My foreman machine is running puppet, puppetdb, foreman, foreman-proxy, > and postgres, 2 vCPU and 6GB of RAM. It seems that the rake commands are > running away with all the memory and swap. Is there a way to control this? > > Here's what top shows currently: > > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND > > > 30002 foreman 20 0 6602m 3.3g 104 D 13.3 58.3 17:06.22 > /opt/rh/ruby193/root/usr/bin/ruby /opt/rh/ruby193/root/usr/bin/rake > trends:clean > > Seems like a lot of RAM and accumulated CPU time. I can add more RAM, but > other than rake commands like this one, the server doesn't seem to utilize > the memory allocated. > > Any advice on managing ram usage with trends or thoughts on the economies > of scale related to using trends would be helpful. > > Kind regards, > Sean >

What is your vm.swapiness setting, if it is set to the default 60 you might
want to bring it right down to 10 or even 0.

Jim :slight_smile:

··· On 22 April 2014 15:12, Sean Alderman wrote:

UPDATE:

Is anyone using Foreman Trends? I have a total of 114 hosts reporting to
Foreman, and this performance/resource issue seems a little beyond
reasonable for such a small environment. I’m only collecting trends on 5
facts.

After posting the message last week, I added 2GB of RAM to the server, and
I still find that the system is eating deeply into swap. This morning the
trends:clean rake task had 5.5GB of RAM resident, top reports it consuming
67% of the memory.

What can I do to provide better information about what’s going on inside
this rake task for debug purposes?

Thanks.

On Monday, April 14, 2014 10:07:39 AM UTC-4, Sean Alderman wrote:

Greetings,
I am collecting a few trends in foreman using host facts. I’m using a
cron entry for the foreman user: /usr/sbin/foreman-rake trends:counter
every half hour.

My foreman machine is running puppet, puppetdb, foreman, foreman-proxy,
and postgres, 2 vCPU and 6GB of RAM. It seems that the rake commands are
running away with all the memory and swap. Is there a way to control this?

Here’s what top shows currently:

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND

30002 foreman 20 0 6602m 3.3g 104 D 13.3 58.3 17:06.22
/opt/rh/ruby193/root/usr/bin/ruby /opt/rh/ruby193/root/usr/bin/rake
trends:clean

Seems like a lot of RAM and accumulated CPU time. I can add more RAM,
but other than rake commands like this one, the server doesn’t seem to
utilize the memory allocated.

Any advice on managing ram usage with trends or thoughts on the economies
of scale related to using trends would be helpful.

Kind regards,
Sean


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.