Poor performance compared to Ublock

[Edit: I need to warn you that the title of this post is misleading - the analysis in this post by me is faulty. Please read replies below.]
I just set up Pi-hole yesterday on a Rpi 2B, works fine. However I tried to do a test against using Ublock Origin to see how much Pi-hole removed before Ublock had a go and the results were very disappointing.

First I ran with both Pi-hole and Ublock enabled and visited all the sites in this page:
[Mod Edit: Link no longer available]

I noted the number of ads blocked by Ublock which it shows on its icon. Then I flushed the Pi-hole cache with “pihole restartdns” (according to a post I saw) and disabled Pi-hole blocking temporarily, then refreshed the same sites. I expected a big jump in ads shown as blocked by Ublock i.e. now including ones previously blocked by Pi-hole, but this was not the case. The additional blocks caught by Ublock were very small or zero. (For one site - lingscars.com - the numbers were a bit confusing as they went down when Pi-hole was disabled.) I also tested with a different browser (Firefox instead of Chrome - OS is Linux Mint) and the differences were even smaller, although the numbers were slightly different to Chrome’s numbers.

This suggests that the performance of Pi-hole is relatively weak and if I was only using one or two PCs it wouldn’t be worth using Pi-hole but just use Ublock. At the least I should continue using Ublock even if I stick with Pi-hole.

Does this agree with other people’s experience ? (sorry if this topic has already been discussed but I couldn’t find it) Or maybe it points to a problem with my setup. I did refresh the lists and the dashboard says 108,972 domains being blocked.

Does it mean that Ublock has other ways of finding ads not blocked by using lists? Or perhaps it is inflating its statistics somehow?

Pi-hole is a great project, extremely well implemented, so I’m not knocking it. I might still use it anyway because it will help avoid ads in my phone and tablet.

Since Pi-hole just blocks requests to ads, uBlock still thinks that there are ads to be blocked, even though they were blocked by Pi-hole. Pi-hole can’t modify the web site that you see, so it can’t signal to uBlock that an ad is blocked. The only way for uBlock to know that Pi-hole blocked an ad is to see if the ad’s image/resources are missing. Otherwise, uBlock sees that there’s a match against their filter, even if it’s already blocked, and tries to block it. That means it would just be blocking an empty element.

Did you also make sure to flush cache in other areas?

I don’t necessarily agree due to the way each technology works. In addition, we have several users who run only Pi-hole and some who run Pi-hole + uBlock. The two applications complement each other well.

  • An advantage to uBlock is the element hiding and in-depth filtering rules.
  • An advantage to Pi-hole is that you don’t need to install a browser extension and can block ads in apps and other smart devices

Pi-hole will block any content from these domains. uBlock will show individual ads blocked instead of just the domain. If you comparing the number of ads blocked by uBlock to the number of domains blocked by Pi-hole? If so, those numbers will be very skewed due to the way each application works.

All good responses, thanks. I now understand the comparison was not appropriate. I don’t know enough about the detail so thanks for your explanations. As I said before, it’s a great project, many thanks to the developers.

As an aside I wanted to know more about who developed this but the “About Us” on the main pi-hole.net page doesn’t appear to have a link. It would help if you want donations (happy to give when I know something about who is getting it). Pity there’s no Wikipedia article.

Many of us work on it now, but long ago, I started it:

This might be a good thing to bring up in our Site Feedback category... In the meantime, look here.

We could set up a page with the developers, just don’t expect pictures on the page of us, most of us don’t have a lot of personal information available :wink:

1 Like

You can keep specifics out of it to protect your privacy, but perhaps give a flavour of some of these: full time work, contributions to pi-hole, other projects, other interests and maybe philosophy. Keep it short because I realise you have better things to do.

Anyway a contribution is coming your way today from a grateful user.

1 Like

I signed up to answer your worries here.

uBlock Origin (“uBO”) blocks network requests from the browser before these network requests reaches Pi-hole.

browser => uBO => Pi-hole

This means that typically the number of requests shown as blocked by uBO is unlikely to change if you disable Pi-hole, as uBO can report only what it blocked itself, not what is blocked downstread by Pi-hole. Mainly the problem here is that you measured what was blocked, while you should be measuring is what is not blocked from your browser’s point of view.

That sort of measurement is possible using uBO-Scope: https://github.com/gorhill/uBO-Scope. This extension will derive a score from the number of distinct base domain names for which there was a connection, and the ubiquitousness of those domain names for which there was a connection. It works independently of uBO, so it can be used to measure all sorts of blocking profile, including when nothing is blocked.

uBO-Scope will show you a list of all the base domain names for which there was a connection on a given page, you can use that list to assess different combinations: uBO alone, Pi-hole alone, uBO + Pi-hole.

Note that it’s more of an experimental extension, so what I say above is assuming that uBO-Scope will be able to detect that a network request has been blocked by Pi-hole, this is not something I have tested, or something I am in a position to test – but I am willing to have this fixed if needed, and if possible (uBO-Scope tests if the status code of the response is different than zero, it expects zero to be returned for blocked network requests).

1 Like