<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[is allocate more CPU resources to Captive Portal possible?]]></title><description><![CDATA[<p dir="auto">Is it possible to tweak the amount of resources allocated for the captive portal? I would like to allocate more if possible.</p>
<p dir="auto">We are working with a venue which can support up to 50k users but 24-30k(non covid era stats) on average is seen during events.  In the event break, we see between 3-5k users logging on to the network in as little time as two to three minutes. Stats is from a Cisco WLC.</p>
<p dir="auto">Due to limited resources(covid/event industry), we have had to make due with a bit older hardware(their old vsphere cluster hardware),  We  have 64 cores and more ram than we would ever need, distributed across 3 separate servers running pfsense (no virtualization)<br />
Each server has a associated VLAN and clients are distributed equally across vlans by the Cisco WLC.<br />
Captive portal auth is simply a checkmark and pressing login (nobody ever downloads the terms of service ofc)</p>
<p dir="auto">My worry is not dealing with client traffic (99% smart phone traffic) after clients has been through the captive portal, but we do see a pretty good spike on the CPU side when they initially have to associate and get authorized.</p>
<p dir="auto">We have gone as far as possible with minimizing graphics and such, to avoid the nginX having to server large files etc, but i was wondering if there was a way where i can assign more cores/resources to the captive portal nginX process (or if this is done dynamically).. if its done dynamically, maybe i can lift up the default assigned amount of resources so there is a bit more power from the start?</p>
<p dir="auto">I hope my questions is detailed enough, but do feel free to ask for any information and i will try to provide something.</p>
<p dir="auto">All the best.</p>
]]></description><link>https://forum.netgate.com/topic/163750/is-allocate-more-cpu-resources-to-captive-portal-possible</link><generator>RSS for Node</generator><lastBuildDate>Wed, 11 Nov 2026 09:55:50 GMT</lastBuildDate><atom:link href="https://forum.netgate.com/topic/163750.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 14 May 2021 09:06:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to is allocate more CPU resources to Captive Portal possible? on Mon, 26 Jul 2021 08:21:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/free4" aria-label="Profile: free4">@<bdi>free4</bdi></a></p>
<p dir="auto">I will post the specs shortly :)</p>
]]></description><link>https://forum.netgate.com/post/993964</link><guid isPermaLink="true">https://forum.netgate.com/post/993964</guid><dc:creator><![CDATA[ketil]]></dc:creator><pubDate>Mon, 26 Jul 2021 08:21:28 GMT</pubDate></item><item><title><![CDATA[Reply to is allocate more CPU resources to Captive Portal possible? on Fri, 23 Jul 2021 17:46:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ketil" aria-label="Profile: ketil">@<bdi>ketil</bdi></a> Woow.</p>
<p dir="auto">Out of curiosity, what are the hardware specs of your pfSense server?</p>
]]></description><link>https://forum.netgate.com/post/993652</link><guid isPermaLink="true">https://forum.netgate.com/post/993652</guid><dc:creator><![CDATA[free4]]></dc:creator><pubDate>Fri, 23 Jul 2021 17:46:34 GMT</pubDate></item><item><title><![CDATA[Reply to is allocate more CPU resources to Captive Portal possible? on Wed, 21 Jul 2021 10:43:05 GMT]]></title><description><![CDATA[<p dir="auto">First of all, i want to say thank you  <a class="plugin-mentions-user plugin-mentions-a" href="/user/free4" aria-label="Profile: free4">@<bdi>free4</bdi></a>  for the very nice and detailed explanation.</p>
<p dir="auto">We ended up going through a month of events with a peak of concurrent 15k users (where usage segments was longer than 10 minuts)</p>
<p dir="auto">We luckyly never went above 2gigs in upload and 1 in downloads, so it was good, and i feel confident we will be able to easily deal with around 30-40k concurrent users in a worstcase senario.  Updates will properly be needed for 40+, but a budget has been allocated.</p>
<p dir="auto">We experienced most load around the joining processs with the webserver having to deal with the captive portal visits. But we never moved towards a load which would have been considered critical.</p>
<p dir="auto">have a great day and thanks !</p>
]]></description><link>https://forum.netgate.com/post/993255</link><guid isPermaLink="true">https://forum.netgate.com/post/993255</guid><dc:creator><![CDATA[ketil]]></dc:creator><pubDate>Wed, 21 Jul 2021 10:43:05 GMT</pubDate></item><item><title><![CDATA[Reply to is allocate more CPU resources to Captive Portal possible? on Sat, 15 May 2021 07:09:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ketil" aria-label="Profile: ketil">@<bdi>ketil</bdi></a> Hi,</p>
<ul>
<li>
<p dir="auto">The nginx config for managing the captive portal is located at <code>/var/etc/nginx-{$cpzone}-CaptivePortal-SSL.conf</code> (and <code>nginx-{$cpzone}-CaptivePortal.conf</code> for the non-SSL webserver)</p>
</li>
<li>
<p dir="auto">This config get automatically updated (&amp; nginx get restarted) every time any update is made on the captive portal configuration. The code managing this update can be found here :<br />
<a href="https://github.com/pfsense/pfsense/blob/RELENG_2_5_1/src/etc/inc/system.inc#L1235" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/pfsense/pfsense/blob/RELENG_2_5_1/src/etc/inc/system.inc#L1235</a>.</p>
</li>
<li>
<p dir="auto">There is an nginx variable, <code>worker_processes</code>, which defines how many nginx workers should run in parallel. Each worker is running on a specific core. By default, this variable is set to 6 workers for the captive portal, but this can be adjusted by changing <a href="https://docs.netgate.com/pfsense/en/latest/config/advanced-admin.html#max-processes" target="_blank" rel="noopener noreferrer nofollow ugc">Max Processes</a> in the advanced system configuration. (The number of nginx workers for the captive portal configuration is defined as such : <a href="https://github.com/pfsense/pfsense/blob/RELENG_2_5_1/src/etc/inc/system.inc#L1305" target="_blank" rel="noopener noreferrer nofollow ugc">number of nginx workers for the GUI + 4</a>)</p>
</li>
<li>
<p dir="auto">Each worker can have up to 1024 simultaneous connections (Because <code>worker_connections  1024</code> <a href="https://github.com/pfsense/pfsense/blob/RELENG_2_5_1/src/etc/inc/system.inc#L1330" target="_blank" rel="noopener noreferrer nofollow ugc">is hardcoded here</a>).</p>
</li>
<li>
<p dir="auto">Depending on how you change these settings, you may have to update some turntables (i'm thinking specifically about <code>kern.maxfiles</code> and <code>kern.maxfilesperproc</code>, which are the FreeBSD ulimit).</p>
</li>
</ul>
<p dir="auto">Also, i would like to warn you about tweaking these settings: "Higher is not necessary better". By increasing the number of simultaneous connections, you may run into other bottleneck and slow down each connection...It is preferable to serve 1k simultaneous connections in 1 second &amp; then to serve another 1k in the next second, than to serve 2k simultaneous connections in 4 seconds.</p>
]]></description><link>https://forum.netgate.com/post/983138</link><guid isPermaLink="true">https://forum.netgate.com/post/983138</guid><dc:creator><![CDATA[free4]]></dc:creator><pubDate>Sat, 15 May 2021 07:09:33 GMT</pubDate></item></channel></rss>