Netgate SG-1000 microFirewall

Author Topic: Combination of Squid Stable and Dansguardian causes very high MBUF  (Read 1498 times)

0 Members and 1 Guest are viewing this topic.

Offline kejianshi

  • Hero Member
  • *****
  • Posts: 4995
  • Karma: +199/-43
  • Debugging...
    • View Profile
Hi all.  I was having a problem with very high MBUF approaching the limit.  Example  24460/25600.  This was fairly new.  Never happened before.  Normally, it would sit around  3460/25600 or so for many many days and never really change much.  The only things I had changed is I added squid stable and dansguardian to an otherwise absolutely vanilla setup.  So, I wiped the box and re-installed.  With no packages loaded, there was no MBUF issue.   After adding squid stable, there was still no MBUF issue.  After then installing Dansguardian, the MBUF problem returned.  So, I removed Dansguardian again leaving only squid stable and the MBUF numbers are back where they have always been.  Low. So, I figure this must be an issue with Dansguardian causing some sort of memory leak.
Anyway, it would be nice is it didn't do that because I like dansguardian. 
I'm using Pfsense version:
2.0.3-RELEASE (i386)
built on Fri Apr 12 10:22:57 EDT 2013
FreeBSD 8.1-RELEASE-p13

Offline jimp

  • Administrator
  • Hero Member
  • *****
  • Posts: 21566
  • Karma: +1471/-26
    • View Profile
Re: Combination of Squid Stable and Dansguardian causes very high MBUF
« Reply #1 on: July 01, 2013, 03:56:51 pm »
Just increase your nmbclusters so you get more. Many workloads will max out the default mbuf values.

http://doc.pfsense.org/index.php/Tuning_and_Troubleshooting_Network_Cards
Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!

Offline kejianshi

  • Hero Member
  • *****
  • Posts: 4995
  • Karma: +199/-43
  • Debugging...
    • View Profile
Re: Combination of Squid Stable and Dansguardian causes very high MBUF
« Reply #2 on: July 01, 2013, 04:25:39 pm »
OK - I'll do I'll try that tweak.  System has 1 nfe0 that I'm using on WAN that is 10/100.  The internet never gets to 100 much here.  I have 1 dual port PCIe Intel NIC that is 10/100/1000 and 1 single port PCI Intel NIC that is 10/100/1000.  Those are em0-em2.  The LANs are all disallowed to see each other to give my tenants privacy.  All The gigabit Intel NICs are set up as LAN ports.  So, will I have to apply this tweak for just the nfe(0) wan, the em(0-3) LANs or for all? I noticed the patches are different for each card type.

Offline adam65535

  • Sr. Member
  • ****
  • Posts: 329
  • Karma: +9/-0
    • View Profile
Re: Combination of Squid Stable and Dansguardian causes very high MBUF
« Reply #3 on: July 03, 2013, 05:25:36 am »
Does anyone know if the patch mentioned in the thread below will be integrated with pfsense at some point (either 2.1.x or 2.0.x)... or is it already?

http://comments.gmane.org/gmane.os.freebsd.devel.net/39495

It sounds like they fixed at least the igb driver to scale hw.igb.num_queues (and maybe mbufs?) better by default according to that somewhat recent thread (june 20th 2013).  I don't know if other drivers got the same fix or not.  I use quad port nics btw.
« Last Edit: July 03, 2013, 05:28:44 am by adam65535 »

Offline kejianshi

  • Hero Member
  • *****
  • Posts: 4995
  • Karma: +199/-43
  • Debugging...
    • View Profile
Re: Combination of Squid Stable and Dansguardian causes very high MBUF
« Reply #4 on: July 03, 2013, 08:17:53 pm »
A can confirm that making the changes helped MBUF.  No more issues.  I didn't have any erratic behaviour so I didn't apply the NIC specific fixes.  Just the increased MBUF.