Solution to slow FTP Server speeds (Filezilla and others)

Posted by under Servers, on 23 March 2016 @ 10:50pm.

I recently found that despite having a 70Mbps (8.75MB/s) internet connection and a 1Gbps (125MB/s) dedicated server to download from, I could only seem to download from the FTP server at about 16.8Mbps (2.1MB/s) on a single thread. However over HTTP I could easily manage about 65.6Mbps (8.2MB/s) on a single thread. This confused me, as there should be no reason why the speeds should differ so wildly. I’d expect a little difference, but not that much.

After some forum discussions on Beta Archive regarding this (I looked into things after a user complained about slow speeds), a user told me that he uses IIS FTP Server with no such speed issues. This instantly told me that something wasn’t implemented or optimised properly on Filezilla and Gene6 FTP Server (the two servers I use). I started looking at the possibilities and quickly found the solution.


The “internal transfer buffer size” and the “socket buffer size” values were set quite small on the server at just 32KB and 64KB. There is a notice that says too low or too high can affect transfer speeds. So I did what anyone would do… I bumped it up about 10 notches to 512KB on both of them! Instantly my transfer speeds hit 65.6Mbps (8.2MB/s), the same as I was getting over HTTP. Perfect!


More tests

I did a few more tests to make sure that I didn’t set it too high or too low, but it seemed OK. Going from 64KB to 128KB made the speed hit about 46.4Mbps (5.8MB/s). Better, but not good enough. 256KB buffer allowed me to hit 65.6Mbps (8.2MB/s), which is the maximum I’m likely to get due to protocol overheads.

Assuming that the buffer size doubling also doubles the speed, a buffer of 512KB should allow up to about 192Mbps (24MB/s) which really is more than enough for the things I need it to do. Given my connection is much slower than this, and broadband in the UK doesn’t really hit those speeds either, it should be plenty for now.

Filezilla only allows a maximum buffer size of 999,999 (almost 1024KB or 1MB) so the maximum it should allow (again assuming that the buffer doubling = speed doubling) is about 384Mbps (48MB/s). Other software might allow higher so by all means use it if you need to.



Driving a hybrid car – a whole new driving experience

Posted by under Technology, on 20 March 2016 @ 1:36am.

hybridI’ve been looking at new cars again recently and I decided I’d look at hybrid cars. Now I know what a lot of people are going to say – “what’s the point” or “they put out more CO2 to make than they’ll save”, and all that sort of stuff. But this is coming from people who know nothing about how they are made or how they work. I had the chance to drive a hybrid a few weeks ago, a Lexus CT200h, when I was considering what car to buy, and it’s completely changed the way I perceive them.

The driving experience

You would think that no matter what car you drive the experience would be very similar. You get in, you drive, and it feels pretty much the same as any other car, but in the case of a hybrid you’d be wrong. Most people will only have driven a standard manual or a typical automatic gearbox car. There is always the consistent whirring of the engine, and the very slight lurch feeling when it changes gear (or severe if you’re incapable of driving a manual smoothly). In a hybrid you get less of the whirring and none of the lurching feeling.

How is that possible? Well it’s mostly thanks to the CVT (constantly variable transmission) gearbox. Essentially instead of a set number of gears with set ratios like a regular manual or automatic gearbox, a CVT is capable of an infinite number of gears between two gear ratios. It does this through a set of pulleys that can change size and a drive chain/belt. You feel absolutely nothing when it’s changing through these gears. It’s completely seamless and smooth.

On top of the CVT you also have electric motors which can operate on battery only up to a certain road speed without the assistance of the engine (unless speeding up relatively quickly). Both the electric motors and the CVT make the engine overall quieter. Either the engine doesn’t run at all when you’re using electric only, or it runs at a much lower RPM than a regular transmission would (unless you put your foot down). The result is the smoothest transition throughout all speeds than you will have ever felt before. It’s almost a dream world and it’s an absolute pleasure to drive. I’ll admit that this alone almost makes a hybrid worthwhile, but there’s more to it than that.

The potential increase in fuel economy

I say ‘potential’ because you have to drive it right. Don’t expect to get in, mash the throttle and get 55mpg. It doesn’t work like that. You have to take advantage of the technology properly. This is one that everyone will call you out on because they’re not taking proper advantage. It makes them ask the question “is it really more efficient?’.

Well let me come clean here and say that I can’t use my test drive as a basis for one simple reason; The average MPG counter was reset on the car I drove and on this car it works over a tank of fuel rather than on a single journey, so the reading was wildly inaccurate. The 25mpg average that it showed to me was definitely incorrect as it was still rising even after 40 minutes of mixed driving. But anyway, lets look at how a hybrid works.

The most important thing to remember is that speeding up in any car is inefficient, be it petrol or diesel. The time that economy is worst is when idling and speeding up. Any time you put your foot down even the slightest bit your economy suffers massively, so don’t expect to be able to buy a hybrid and instantly get more economy if you have a lead foot. Hybrids are a partial solution to the problem – here’s how…

Internal combustion engines are at best 20-30% efficient at converting the fuel into usable energy to propel the vehicle forward, and this is at best. The rest of the energy is converted to heat. The saving grace is the electric hybrid system. The electric motor and the battery is much more efficient at around 80% or more, so if it’s a higher efficiency then it’s capable of using the energy store much more effectively.

Now consider this – every time you use your brakes, what happens? You turn your forward momentum into heat through your brake pads creating friction against the brake disks. It’s all wasted as heat. You gain no benefit from creating that heat other than bringing the vehicle to a stop. In a hybrid vehicle, the primary means of stopping is regenerative braking which uses your forward momentum to run a generator, which charges your hybrid battery. A large amount of the energy you would normally turn into heat is put into your hybrid battery as electrical power and this slows the vehicle down too. This power can then be used for the electric motor to get the car up to speed again. Instead of wasting the energy as heat, you store it as electrical energy for use later. If you’re doing a lot of stopping and starting then that can add up to be a lot of saved energy.

This is one way hybrids are able to achieve higher economy, especially around town, over a conventional car. But note that I said ‘one way’. That’s because there is another way too. Have you noticed how the hybrid cars have a relatively high displacement engine but a low power output? There is a reason for that. These engines essentially use a lower compression ratio through the Atkinson Cycle to get a more efficiency out of the engine by allowing the fuel to burn more thoroughly, thus extracting more energy out of it. To do this and get any usable power though you need a higher displacement engine.

The car I drove was a 1.8L engine which produced just 103BHP, a fair amount less than a typical 1.8L engine. This power is however supplemented by the hybrid system by an additional 35BHP to create 138BHP when it’s needed to give more power when you put your foot down. The result of this is a higher economy overall through a more efficient but less powerful engine, but still plenty of power to pull away when needed.

Lets be honest with each other – how often do you run your engine flat out for minutes on end? I can bet almost never. What this means is that you can get away with a reasonable sized displacement engine that produces lower power but does so more efficiently thanks to the Atkinson Cycle engine, and gain supplement this with power from the hybrid system when it’s needed.

Knowing how to drive

As I said above, you can’t just mash the pedal and expect results. You have to know how to take advantage of the hybrid system. You need to understand how the process works and how to manage that so that it’s used in the best possible way. So how do you do that? Let me break it down into chunks.

  1. Pulling away/speeding up – Once up to temperature the engine should not be running when you’re stopped. It doesn’t need to because it’s at operating temperature and can start up at any time its required to give the requested power. Instead, the hybrid system will run on its own until the hybrid battery is depleted, you exceed a set speed, or you request more power than the hybrid system can give on its own. So the trick here is to use best use of the electric system as much as possible by pulling away on electric power only without the engine kicking in. The best use of this would be to get to the desired speed (say 30mph) on electric only and once there, the engine can kick in just enough to keep your speed consistent. Remember what I said before about most fuel being used when speeding up. If you’re not speeding up but are just maintaining speed, you minimise fuel use. Most hybrids are limited to 30-40mph on electric only but you still get all the benefits up to that point.
  2. Cruising – Cruising is just like any other car but with one difference, that being that the hybrid system in the car will switch the electric motors on where it thinks that it can be beneficial rather than using extra engine power. That again reduces fuel use by not using any fuel, or less of it, to speed up. Whenever you slow down a little too the hybrid system will regain some energy, as well as a small charge from regular driving to maintain the hybrid battery.
  3. Slowing to a stop – Anticipating coming to a stop is the best thing you can do in a hybrid. Look ahead and predict whether you’re going to need to come to a stop and where that’s likely to be. Once you’re used to the way your regenerative braking works (how much braking power it can give you) you should be able to judge where you’ll stop just using regenerative braking. What you want to avoid is ever using the conventional brakes to bring you to a stop except for the last few MPH where the regen braking becomes inoperative. If you can come to almost a complete stop on regen braking alone, you’ve just recaptured the most amount of energy that would otherwise have been lost as heat. Next time you pull away, that captured power is then used to get you moving again without burning even a tiny bit of fuel that you would in a regular car.
  4. Traffic – Hybrids come into a world of their own in stop-start traffic. When all the conventional cars are sat idling their engines, burning fuel and not really going anywhere, a hybrid sits there using no fuel and moving those few meters every minute or so when needed under electric power only. Economy skyrockets in these situations and it’s one time you can sit there and look smug while everyone else is emptying their wallets into the atmosphere.


So admit to yourself, given the above I bet you can finally agree a hybrid can be more economical around town and on motorways, assuming you don’t have a lead foot of course, right? Well, if that’s not convinced you, then there’s no hope :-)!

A comparison with my current car

I currently drive a VW Passat 2.0 TDI with 140BHP. It’s not a slow car and it’s pretty big too. But it runs an older diesel engine which isn’t very efficient. As a result I get a measly 43mpg average from it when modern diesels can approach the low to mid 50’s.

A modern petrol hybrid typically gets 50-55mpg+ without trying too hard based on actual data submitted by owners. I linked to the Toyota Prius because it’s got a lot more data than the Lexus CT200h, but the drivetrain between the two is very similar, and someone I know who owns one achieves similar results too. Getting that sort of miles per gallon from any petrol is very good as you’ll struggle to find any hitting any more than the low 40’s in most other cases. The numbers from actual owners data speaks for itself.

Now of course everyone is not going to get the same figures as another person, because we all drive differently, drive different routes, and drive for different times and distances. But the numbers do show it is possible for the average person to achieve a decent economy figure without trying and with a little work you could easily increase it.

Would I buy a hybrid?

Yes. In fact I am considering it. The things putting me off is the amount it costs to buy one and if they go wrong things can get expensive quickly. But that’s where warranties come in, and most hybrid manufacturers cover the hybrid system (and the rest of the drivetrain) for the full term of the warranty and you can extend it relatively cheaply too. But this said, it would appear from my research that the hybrid systems on the car I drove are incredibly reliable.

Now of course you’re never going to actually save money unless the number of miles you do are huge or all the miles you do are around town and your previous car’s economy was absolutely abysmal. But as I went through at the start of this blog, it’s not all about the economy. The driving itself is in a new realm of its own with its smoothness, quietness and the general comfort that comes from that.

I’m not saying to go out right now and buy one without actually getting in and driving one first as that would be an investment disaster. But don’t just pass it by because you believe without trying it that hybrids are bad, that they don’t get the economy people say they do, that they produce more CO2 to make than they’ll ever save, etc. Look into it. Do the maths. Get the facts. Use your common sense. Make your own judgement based on what you find and don’t take other peoples opinions at face value without working it out for yourself.