# Speeding up dansguardian

## Ctrl+Alt+Del

I've got a router that runs Shorewall/Squid/Dansguardian (transparent). It's working quite well, there's only one minor issue that is really annoying me atm. Dansguardian is to slow for my taste.

The Box is a P3-500 with 512MB Ram and a 20gb ide drive and is currently serving ~10 People (will be around 75 Users once i consider the box stable  :Smile:  ).

At the Moment everytime a 'new' site is accessed and dg starts to parse the blacklists the cpu load goes up to 90% and the it'll take 2-3 seconds till the site is actually loading. The Blacklists are on a Reiserfs formatted drive. Now i am looking for ideas on how to speed dg up. My first two ideas where to store the blacklists into a mysqldb or a ramdisk. (i have no idea wether that may actually work)

So before i start muddling into things i have no clue about i wanted to ask around if someone else may have had a better idea or some hands on tips.

----------

## DawgG

sorry, i can't help you right now bit i'm preparing a similar setup and doing the same considerations.

i suspect that dansguardian is quite cpu-intensive, since everything needs to be parsed and compared. i have squid and dansguardian on a dual-processor with 2gb ram and when a site is accessed for a short time both cpus go up to 100% because of dg.

since the box will have to serve 200+ (heavy) users i will examine this closely before it gets put in production.

maybe your box is a little weak on the hardware-side? squid-docs state that the bottleneck is usually the hard-drives; and so putting the system and cache-dirs on the same ide-drive may slow things down, especially with a cpu-intensive dg on the same box (but i'm just guessing).

soon i hope we will know more!

----------

## jdmulloy

In /etc/dansguardian/dansguardian.conf

```
phrasefiltermode=0
```

or

```
phrasefiltermode=1
```

0 = raw

1 = smart

2 = both

2 will use more cpu power than the other two

----------

## unaos

have same trouble too, but in software side. on 2xP3 1Ghz single CPU usage when new page is accessed about 33.4% in a peak. but page loading  time have growed from 0.2s-2s (w/o dansguardian) up to 4-6s (with dansguardian)...

----------

