Category Archives: Tech

Optimising TF2: RealTime Virus Protection interference.

Are you experiencing lag in TF2? Random slowdowns, particularly with larger servers? Does it seem like whatever you change in the settings, it’s still slow?

If, so, it’s probably worth you following this guide. I will be detailing what the issue is, why it happens, and how to remedy it (at least in come cases).

WTF causes it?

In short, it is caused by your antivirus. There is a certain folder on your PC, which is constantly being written to and read from by the game whilst playing. The faster the data gets in and out, the less laggy issues you have with your game. Which leads us onto…

Why does it happen?

It’s not actually that crazily complicated.

Thousands of times per second, the TF2 engine writes to I:\Steam\appcache\stats\. This is normal behaviour for the game, and normally does not cause any issues.

The problem comes when your antivirus gets involved, and tries to apply “Active Protection” to the folder. Normally AP is great; whenever a folder is modified, your AV swoops in and does a quick ocular-pat-down, and gives you the thumbs up if everything is cool.

However, when a folder is having thousands of writes per second, this can have a very detrimental effect on performance. Instead of every file just getting written down or quickly read by TF2 and getting left alone, the AV wants to know what the hell it is doing there. Thousands of times per second.
Even with a good SSD, you’re still going to see a performance drop as the system struggles to check itself quickly enough. Essentially, it triples the I/O on the disk.
The problem is exacerbated when using busy servers: Instead of the usage doubling, it sextuples, sometimes grinding to a nasty halt.

How do I fix it?

Quite simply, just add an exception for the folder. This tells the AV that you trust what is going in and out of the folder, that it’s safe, and that it can stop fretting.

Step 1: Find the folder:

(Windows centric)

The folder lives inside the Steam Appcache folder.
On devices with everything on the OS drive, the path should be:
C:\Steam\appcache\stats
And for people using seperate drives for their TF2 game:
${DriveLetter}:\Steam\appcache\stats

 

Step 2: Tell the AV to leave it alone:

(This details Avast Antivirus, although the procedure is similar in most other providers)

Open the AV interface:avast1

Navigate to settings, select Active Protection, and click Customise on File System Shield:avast2

Select Exclusions, then add your file path, followed by * to indicate the entire folder:

avast3

So in my case, I’d be adding I:\Steam\appcache\stats\*

Somebody using thir OS drive would add IC:\Steam\appcache\stats\*

Step 3: See if it makes a difference:

I’m not going to lie, it’s a case by case basis for success. If I have a few minutes at some point, I’ll try to benchmark the difference. It is 100% worth trying though, especially if you are still using a platter-based HDD (like my long-suffering laptop). I had a very happy person the other day though, so I decided to write this 🙂

Potential Risks:

Just to cover this, you are disabling a section of your antivirus protection. As low as the risks are, there could come a nasty piece of malware that exploits this. The chances are pretty low, but hey, it’s good to know. In fairness, if stuff’s getting modified like that, you’ve probably got bigger problems on your PC.

As you can see in my first image, you will get notifications from the AV saying that you’re a bad person; Just bear in mind what you’re doing, stay safe, and don’t meddle any more than necessary!

Meals without chewing: A few months using Joylent

Lets start with a little history of Soylent, and how Joylent came about:

Soylent, designed by Rob Rhinehart in 2013, was the result of an engineer’s view of human dietary requirements; why not have a powder with all the nutrients a human being requires to function, instead of chewing food all day.
The name comes from the slightly cheesy 1973 sci-fi film “Soylent Green“, where most of the world’s population subsists on a manufactured food source, allegedly made from “high-energy plankton”. I won’t spoil the story, but the film is worth a watch.
Due to supply issues, Soylent also spawned many community designed alternatives, such as Liquid Cake, as well as regional companies, such as Joylent, a rather jolly outfit run by a bunch of crazy dutch bastards Amsterdammers.
“Traditional” Soylent(s) use oil to supply Omega3 to the mix, and as you might expect, this can cause messy accidents during the shipping process, as well as giving you something else to lose.

One of the reasons that I like Joylent, is that they managed to do away with the oil altogether, instead using Flaxseed (as demonstrated in this video).
For me, the biggest advantage is having everything, as one powder, meaning that I can stash bags around home and work without having to keep greasy bottles along with them. It also means that I can keep a meal or two in my backpack without risking a sticky mess in the bottom.
The other big advantage is that they ship to the UK, and backlog permitting, normally within a week, which is cracking.

Thoughts on use so far:

I’ve been using Joylent for a few months now, and for me, it is fantastic.
As an engineering-student/shop-monkey who can barely cook, has little knowledge of nutrition, and a high metabolism, you might’ve guessed that my diet is fairly shocking. I’d honestly say, that 60% of the time, I just eat what I can find for a reasonable price, with not much attention given to flavour or nutritional quality.

I just don’t have the time. (More accurately, I don’t make the time)

Way to often, I will just get to a point in the day, when the stomach monitoring daemon contacts the brain, demanding food before continuing with anything else.
If I am studying, this means breaking off to spend £5 on lunch, or jumping in my time machine to make a sandwich to take with me in the morning.
At work, it means waiting for the shop to be quiet, making sure no-one else is on a break, then spending half my lunch-break finding a reasonably priced sandwich.

Enter Joylent. If I am hungry, I can throw 1/3 of a bag in the bottle, shake, and drink. That is it. And more importantly, it’s a damn sight healthier than a cheeky KFC, or pizza and chips from the canteen. Oh, and 1/3 of the price! (My maths puts it at <£1.70 a meal)
As I have made clear already, I am not normally a healthy eater; were not for my height, I’d probably be a enormous by now. Being able to gulp down a shakerful as a meal, and know that it’s doing me good, is fantastic.
At work, I can even keep it under the desk, and graze throughout the day between customers, so I can take a nap at lunchtime.

Or in the morning. Say I stay in bed 20 minutes too long. I have less than 15 minutes left to make myself presentable and get out of the house. Instead of running around like a madman, gulping down tea and wheatabix in my Cookie Monster pyjamas, I just throw in the powder, and eat en route. It’s great, and I’m not sure if it’s just me eating better and getting more water (or someone slipping ritalin into my order), but I seem to focus far better after a shaker.

OOH! And it is a fantastic hangover breakfast! Gets all the nutrients into your system fast, along with a crap-ton of water 😀

Taste:

Before you look at any other taste reviews, remember that getting the mix right takes practice. All these people doing the “1-week challenge” seem to screw up the mix, and moan about the flavour for at least a couple of days.
When you first start, take a small amount, and experiment a little to find how you like it, before going all out.

My first try was chocolate. I absolutely screwed it up, put way too much water in, and sat in my aoe game, slurping it, and thinking “Oh god, what did I just spend £25 on?”

For the next batch, I made it properly, and…wow. It tastes like food, but nice, chocolatey food.
All the flavours will have an “oaty” underflavor to them, with the main flavor quietly on top. None of them are too sweet (important when swapping savoury food).

The texture is a little like very fine-blended soup.
Both the taste and texture are improved by blending and chilling in the fridge, but cold water and vigorous arm movements still give a perfectly acceptable result. Don’t blame Joylent if you undershake and get a lump.

Flavour summary:

Banana: My favourite of the bunch. It’s tasty, crisp, and flavoury enough to drink recreationally (I had to be careful, after I drank a whole bag in an afternoon). Best chilled, but pretty fine warm too.
Chocolate:
A coaco-ey flavor, not too sweet, nice room-temp or cold. I had some success blending it up with raisins too.
Strawberry:
Reasonably sweet, best served cold, watching rom-coms, or on a summery day.
Vanilla:
Tastes like vanilla. Definitely best served cold. Tastes even better with Cinnamon!

I kept meaning to combine chocolate and banana to make a swirl, but ate it all before remembering…

Reactions of others:

This is an odd one.
From the outside, it just looks like I’m chowing down on a protein shake.
Once you’ve explained it to people though, more often than not, they love the idea, and want me to order them some. I find calling it a “Food Replacement” does wonders helping others comprehend.

Work colleagues made jokes about bulking, but in fact two are now ordering for themselves.

Student friends were initially sceptical, but are now planning to pinch bags from my next order (I got them some shakers too, ’cause I’m awesome)

Mum really liked it when I brought some down over Christmas, and was pleased to know that I had improved my diet.
My sister took a massive affront to it, I think because she was uncomfortable with the idea of replacing food.
My brother tried a bit, then stole one of the bags. I’m taking that as a compliment.

Epilogue:

One way that I have differed from others, is not seeing powered food as a challenge. It really isn’t. I’m not replacing every meal, because I don’t have to. I’m not forcing myself to eat it when it’s not needed. (Half-price steak in Tesco’s? You better believe that the Soylent stays in the cupboard).

It’s a fill-in. It stops the gap that would otherwise be filled with crap. It means I don’t end up shakey because I forgot to eat again.
And that is why it is fantastic. You can integrate it with your life, when it suits you, or when you need it.

I might well do a week of nothing but powdered food, as a wee documented challenge. One thing I will not do is base my intake on the size of the bags.
Doing that is pretty pants-on-head.
If you’re hungry, you eat more, like normal food. If you’ve had enough, don’t force it down. The bag sizes are a guideline, not scientifically proven maximums.

Overall, it’s a pretty neat invention, and Joylent made it even better.

Questions? Thoughts?
Comment away.