<div dir="ltr">Yeah, it was quite a trial to get it to scale to that degree, so I tried a lot of different things.  I increased the max_fds in the jabber configs and the ulimits for the jabber user and it's pretty stable now, though even the back end Python code wasn't written for having multiple osa dispatchers (one overwrites the other with respect to the database password in the rhnpushdispatcher table in the main database).<div><br></div><div>As for proxies, we have 4 in each datacenter but even that was bringing down the database due to what I realized later was OSAD restarting on all systems when Puppet would run in the morning.  That coupled with the database locks that were being set on the snapshot tables, because Spacewalk for some reason thought the base channels were updated daily, made the UI completely unresponsive and unusable by our operations folks trying to run the patching for hundreds of systems at a time.</div><div><br></div><div>As for the proxies, my main struggle was putting them behind F5 local and global load balancers.  I signed the SSL certs with the name of the global WIP, and unfortunately the way the jabber S2S component works, it was trying to use that same name for all the proxies.  I realized later I was trying to fit a square peg into a round hole and fixed up the Puppet module, disabled snapshots, and disabled Jabber on the proxies and pointed the clients at the masters, instead.  That was after months of frustration and a growing chorus of complaints on the issues with the UI on the masters.</div><div><br></div><div>Anyway, having the proxies helped reduce the load significantly on the masters, as they still function with the other components like Apache httpd and Squid for caching the RPMs.</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Oct 11, 2016 at 5:02 PM Paul Robert Marino <<a href="mailto:prmarino1@gmail.com">prmarino1@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Matt,<br class="gmail_msg">
you ave a lot of clients so those numbers start to make sense to<br class="gmail_msg">
increase the database connections.<br class="gmail_msg">
also OSAD isn't meant to scale that high in fact you should run out of<br class="gmail_msg">
file handles for it before it even gets to that many clients.<br class="gmail_msg">
further more I hope you are using spacewalk proxies if not you may<br class="gmail_msg">
find they help you a lot.<br class="gmail_msg">
<br class="gmail_msg">
As to the original poster look at this page<br class="gmail_msg">
<a href="https://www.postgresql.org/docs/9.2/static/runtime-config-resource.html" rel="noreferrer" class="gmail_msg" target="_blank">https://www.postgresql.org/docs/9.2/static/runtime-config-resource.html</a><br class="gmail_msg">
specifically work_mem I would be willing to bet that is your issue<br class="gmail_msg">
because it isn't enough for Spacewalk by default.<br class="gmail_msg">
the easiest way to confirm it is to look in the postgresql base data<br class="gmail_msg">
directory /var/lib/pgsql/data by default and look for a directory<br class="gmail_msg">
called pgsql_tmp if there are any files in that directory then you<br class="gmail_msg">
know its swaping.<br class="gmail_msg">
further more you can look for any queries that have been running for a<br class="gmail_msg">
long time and run explain analyze on them.<br class="gmail_msg">
I normally do not suggest this site or any ones like it because they<br class="gmail_msg">
often give very wrong answers but in this case its not a bad answer<br class="gmail_msg">
<a href="http://dba.stackexchange.com/questions/112079/slow-query-performance-due-to-temporary-file" rel="noreferrer" class="gmail_msg" target="_blank">http://dba.stackexchange.com/questions/112079/slow-query-performance-due-to-temporary-file</a><br class="gmail_msg">
I just don't suggest going strait to 64M<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
On Tue, Oct 11, 2016 at 8:37 AM, Allan Moraes <<a href="mailto:allan@allanmoraes.com.br" class="gmail_msg" target="_blank">allan@allanmoraes.com.br</a>> wrote:<br class="gmail_msg">
> Thank you for the tips,<br class="gmail_msg">
><br class="gmail_msg">
> In this case there is available 6GB of memory and the high I/O occur at the<br class="gmail_msg">
> postgres disk. Other disks, the I/O is normal. The system not is using swap<br class="gmail_msg">
> and there is 3GB of swap.<br class="gmail_msg">
><br class="gmail_msg">
> I will separate the postgre and apply your tips.<br class="gmail_msg">
><br class="gmail_msg">
> 2016-10-10 21:58 GMT-03:00 Matt Moldvan <<a href="mailto:matt@moldvan.com" class="gmail_msg" target="_blank">matt@moldvan.com</a>>:<br class="gmail_msg">
>><br class="gmail_msg">
>> We have about 6,000 systems to manage and it was unusable otherwise... I<br class="gmail_msg">
>> had way too much trouble trying to get OSAD to work through proxies and F5<br class="gmail_msg">
>> load balancers, so I had to end up pointing them all to two masters that are<br class="gmail_msg">
>> still using the same Postgres database VM.  I was also toying with having<br class="gmail_msg">
>> the database be the back end for OSAD, so with that in mind the number of<br class="gmail_msg">
>> concurrent clients would often reach higher than usual numbers...  I tried a<br class="gmail_msg">
>> lot of different things to get Spacewalk stable, usable, and have proper<br class="gmail_msg">
>> failover, so I don't know that any of my recommendations or environment<br class="gmail_msg">
>> specific settings might be a silver bullet for anyone else, but it can't<br class="gmail_msg">
>> hurt to try, and learn in the process.<br class="gmail_msg">
>><br class="gmail_msg">
>> On Mon, Oct 10, 2016 at 6:23 PM Paul Robert Marino <<a href="mailto:prmarino1@gmail.com" class="gmail_msg" target="_blank">prmarino1@gmail.com</a>><br class="gmail_msg">
>> wrote:<br class="gmail_msg">
>>><br class="gmail_msg">
>>> tuning for 5000 clients is nuts that would hurt your performance<br class="gmail_msg">
>>> try running pgtune for about 50 to maybe 500 clients max, but I try<br class="gmail_msg">
>>> the lower setting first.<br class="gmail_msg">
>>> Now lets talk about the high IO that usually happens when you don't<br class="gmail_msg">
>>> have enough working memory in PostgreSQL's configuration. When that<br class="gmail_msg">
>>> happens PostgreSQL creates temp files that are slow and do a lot of<br class="gmail_msg">
>>> write IO during read operations because it will have to swap the data<br class="gmail_msg">
>>> out to the temp files, note setting the number of connections too high<br class="gmail_msg">
>>> would exacerbate that issue f its the root cause.<br class="gmail_msg">
>>> By the way I managed up to 400 with spacewalk and never had to disable<br class="gmail_msg">
>>> the snapshots.<br class="gmail_msg">
>>><br class="gmail_msg">
>>><br class="gmail_msg">
>>> On Mon, Oct 10, 2016 at 4:48 PM, Matt Moldvan <<a href="mailto:matt@moldvan.com" class="gmail_msg" target="_blank">matt@moldvan.com</a>> wrote:<br class="gmail_msg">
>>> > I had similar issues and ended up first breaking out the database to<br class="gmail_msg">
>>> > it's<br class="gmail_msg">
>>> > own VM, then increasing the Postgres debug logs.  I saw that there were<br class="gmail_msg">
>>> > a<br class="gmail_msg">
>>> > large number of operations running against the snapshot tables, with<br class="gmail_msg">
>>> > locks<br class="gmail_msg">
>>> > and so on being set for a long period of time.  In /etc/rhn/rhn.conf,<br class="gmail_msg">
>>> > try<br class="gmail_msg">
>>> > disabling snapshots with:<br class="gmail_msg">
>>> ><br class="gmail_msg">
>>> > enable_snapshots = 0<br class="gmail_msg">
>>> ><br class="gmail_msg">
>>> > I also did quite a bit of Postgres tuning using pgtune, for 5,000<br class="gmail_msg">
>>> > clients or<br class="gmail_msg">
>>> > so:<br class="gmail_msg">
>>> > pgtune -i data/postgresql.conf  -o ./data/postgresql.conf.new -c 5000<br class="gmail_msg">
>>> ><br class="gmail_msg">
>>> > Another thing that may help is installing pgbadger to analyze your<br class="gmail_msg">
>>> > Postgres<br class="gmail_msg">
>>> > logs... it has some nice visualizations of the types of queries and<br class="gmail_msg">
>>> > tables<br class="gmail_msg">
>>> > involved, which may point you in the right direction if snapshots<br class="gmail_msg">
>>> > aren't the<br class="gmail_msg">
>>> > reason for the high utilization.<br class="gmail_msg">
>>> > <a href="https://github.com/dalibo/pgbadger" rel="noreferrer" class="gmail_msg" target="_blank">https://github.com/dalibo/pgbadger</a><br class="gmail_msg">
>>> ><br class="gmail_msg">
>>> > Hope that helps.<br class="gmail_msg">
>>> ><br class="gmail_msg">
>>> > On Mon, Oct 10, 2016 at 4:06 PM Konstantin Raskoshnyi<br class="gmail_msg">
>>> > <<a href="mailto:konrasko@gmail.com" class="gmail_msg" target="_blank">konrasko@gmail.com</a>><br class="gmail_msg">
>>> > wrote:<br class="gmail_msg">
>>> >><br class="gmail_msg">
>>> >> Because all your systems request information from SP, and default<br class="gmail_msg">
>>> >> installation doesn't make any sense if you have more that 50 machines,<br class="gmail_msg">
>>> >> so<br class="gmail_msg">
>>> >> you need to tyne postgres, tomcat & linux itself<br class="gmail_msg">
>>> >><br class="gmail_msg">
>>> >> On Mon, Oct 10, 2016 at 12:34 PM, Allan Moraes<br class="gmail_msg">
>>> >> <<a href="mailto:allan@allanmoraes.com.br" class="gmail_msg" target="_blank">allan@allanmoraes.com.br</a>><br class="gmail_msg">
>>> >> wrote:<br class="gmail_msg">
>>> >>><br class="gmail_msg">
>>> >>> Hi<br class="gmail_msg">
>>> >>> In my CentOS 7 server, is installed the spacewalk 2.4 and PostgreSQL<br class="gmail_msg">
>>> >>> from<br class="gmail_msg">
>>> >>> default installation. Via iotop, my postgresql write a lot of<br class="gmail_msg">
>>> >>> informations,<br class="gmail_msg">
>>> >>> during all day. Why this occur?<br class="gmail_msg">
>>> >>><br class="gmail_msg">
>>> >>> _______________________________________________<br class="gmail_msg">
>>> >>> Spacewalk-list mailing list<br class="gmail_msg">
>>> >>> <a href="mailto:Spacewalk-list@redhat.com" class="gmail_msg" target="_blank">Spacewalk-list@redhat.com</a><br class="gmail_msg">
>>> >>> <a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" rel="noreferrer" class="gmail_msg" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br class="gmail_msg">
>>> >><br class="gmail_msg">
>>> >><br class="gmail_msg">
>>> >> _______________________________________________<br class="gmail_msg">
>>> >> Spacewalk-list mailing list<br class="gmail_msg">
>>> >> <a href="mailto:Spacewalk-list@redhat.com" class="gmail_msg" target="_blank">Spacewalk-list@redhat.com</a><br class="gmail_msg">
>>> >> <a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" rel="noreferrer" class="gmail_msg" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br class="gmail_msg">
>>> ><br class="gmail_msg">
>>> ><br class="gmail_msg">
>>> > _______________________________________________<br class="gmail_msg">
>>> > Spacewalk-list mailing list<br class="gmail_msg">
>>> > <a href="mailto:Spacewalk-list@redhat.com" class="gmail_msg" target="_blank">Spacewalk-list@redhat.com</a><br class="gmail_msg">
>>> > <a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" rel="noreferrer" class="gmail_msg" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br class="gmail_msg">
>>><br class="gmail_msg">
>>> _______________________________________________<br class="gmail_msg">
>>> Spacewalk-list mailing list<br class="gmail_msg">
>>> <a href="mailto:Spacewalk-list@redhat.com" class="gmail_msg" target="_blank">Spacewalk-list@redhat.com</a><br class="gmail_msg">
>>> <a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" rel="noreferrer" class="gmail_msg" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br class="gmail_msg">
>><br class="gmail_msg">
>><br class="gmail_msg">
>> _______________________________________________<br class="gmail_msg">
>> Spacewalk-list mailing list<br class="gmail_msg">
>> <a href="mailto:Spacewalk-list@redhat.com" class="gmail_msg" target="_blank">Spacewalk-list@redhat.com</a><br class="gmail_msg">
>> <a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" rel="noreferrer" class="gmail_msg" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br class="gmail_msg">
><br class="gmail_msg">
><br class="gmail_msg">
><br class="gmail_msg">
><br class="gmail_msg">
> --<br class="gmail_msg">
><br class="gmail_msg">
> Atenciosamente...<br class="gmail_msg">
><br class="gmail_msg">
> Allan Moraes<br class="gmail_msg">
> - Linux Consulting at Venda e Cia<br class="gmail_msg">
> - Founder and Editor at MySQL Box<br class="gmail_msg">
> - Linux System Administrador and DBA MySQL at Umbler<br class="gmail_msg">
><br class="gmail_msg">
> Cel: (51) 81885480<br class="gmail_msg">
> E-mail: <a href="mailto:allan@mysqlbox.com.br" class="gmail_msg" target="_blank">allan@mysqlbox.com.br</a><br class="gmail_msg">
> Skype: <a href="mailto:allan@allanmoraes.com.br" class="gmail_msg" target="_blank">allan@allanmoraes.com.br</a><br class="gmail_msg">
><br class="gmail_msg">
> _______________________________________________<br class="gmail_msg">
> Spacewalk-list mailing list<br class="gmail_msg">
> <a href="mailto:Spacewalk-list@redhat.com" class="gmail_msg" target="_blank">Spacewalk-list@redhat.com</a><br class="gmail_msg">
> <a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" rel="noreferrer" class="gmail_msg" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br class="gmail_msg">
<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
Spacewalk-list mailing list<br class="gmail_msg">
<a href="mailto:Spacewalk-list@redhat.com" class="gmail_msg" target="_blank">Spacewalk-list@redhat.com</a><br class="gmail_msg">
<a href="https://www.redhat.com/mailman/listinfo/spacewalk-list" rel="noreferrer" class="gmail_msg" target="_blank">https://www.redhat.com/mailman/listinfo/spacewalk-list</a><br class="gmail_msg">
</blockquote></div>