Monday, March 26, 2018

The new Firefox, finally a good web browser!

After decades, Firefox finally released a totally new version last year. No more unacceptable javascript handling and memory management, finally.

Now, for the first time in history, I can run Firefox and some other memory-hog programs together. This screen shot shows Firefox and Android Studio, no more crash due to memory leak from Firefox.


If you are not so convinced, you may try the portable version first. It won't overwrite your current Firefox. What I've been doing, though I have to close one to use the other. To tell you the truth, I have not touched the old version for at least 2 months.

A must tweak is to block annoying ads that also consume lots of resources. After trying many of them, the uBlock is the one that does not use lots of CPU and memory like Adblock and AdGuard etc. And it is very fast loading pages, so fast that I cannot see any sign of ad-blocking process which I can with other such add-ons.

I also add this great add-on to Yandex on my phone and tablet. Not only clean and quiet, Yandex now is also extremely smooth and fast. Yandex is the only browser I found acceptable for phones and tablets, and I can really use it to do what I do with Firefox on my computer.

You can copy and paste the following list into your uBlock filter, to block those annoying content found on some Chinese sites (6park etc.). In addition, check "CHN: EasyList China (中文)".

www.bassresource.com##DIV[id="om-c6ckhspxn06fcreu"][class="baltimore-background baltimore-c6ckhspxn06fcreu baltimore-optin-visible baltimore-has-image baltimore-lightbox baltimore-transparent"]
www.mitbbs.com##MARQUEE[class="marquee"]
www.6park.com##MARQUEE
site.6parker.com##DIV[id="scrollWrap"]

Monday, March 19, 2018

Tweaking OpenVPN again

My latest tweaks for OpenVPN is very simple, just add these few lines to the server configure file:

txqueuelen 5000
tcp-nodelay

sndbuf 0
rcvbuf 0
push "sndbuf 174760"
push "rcvbuf 174760"


And add this line to /etc/rc.local on the server, somewhere before "exit 0":

ifconfig venet0 txqueuelen 10000

Replace venet0 with eth0 etc. if necessary, you can find it out with the ifconfig command. That's all.

The default txqueuelen values are way too small, 100 and 1000, for OpenVPN and Linux OS for today's network bandwidth. I saw lots of dropped packets (again, using the ifconfig command). My OpenVPN is used over LTE/4G mobile network, 5000 is enough. My Linux server is on a 10 Gigabit Ethernet, 10000 is about right. The network is significantly smoother than before. My OpenVPN uses TCP protocol, not UDP.

The "tcp-nodelay" option is good for reducing latency, a good thing for VoIP and gaming.

By setting the buffers to 0, OpenVPN will let the OS do the job. The default values are way too small. This is the major boost to speed, from 5Mbps to 20Mbps.

Why not push 0 to clients for sndbuf and rcvbuf? Because old versions of OpenVPN clients will really set these buffer sizes to 0, i.e., no buffer at all, resulting to crawling speed! So, unless all clients can be upgraded, don't do that. For LTE/4G, 174760 does well.