• 1 Post
  • 24 Comments
Joined 2 years ago
cake
Cake day: July 28th, 2023

help-circle
  • Ok – that works a bit differently for our code then. Standard breakers are 10 A and 16 A, which means 10 A and 16 A constant load. Load characteristics affect which profile you use, typical residential alternatives are B and C profile breakers. B trips quicker, C trips slower and is meant for circuits with more reactive load characteristics. 16 A C profile breaker can take up to an hour to trip under 18-19 A load as an example. Your standard breaker can deal with quite a lot of inrush current – even with the faster B profile.

    Wiring is built to withstand approximately 15 A when using a 10 A breaker, and 20 A when using a 16 A breaker. As such, the fuses display the value for constant loads, not for the peak. The most commonly used outlets in the EU (i.e. Schuko) are rated for 8 A continuous, 16 A peak, and are typically put on a 16 A circuit. 10 A circuits are mainly used for lighting nowadays, at least in Finland – 16 A being the standard for most things.

    The voltage difference might have something to do with this, as 230 V will be capable of driving much more power though a potential short. As such any actual fault condition will most likely cause the fuse to trip quite quickly. Also current code mandates GFCI on all outlets in a house, which will help with smaller faults that aren’t enough for the breaker to trip.


  • At least here the electrical service base rate is largely set by the max amperage you can draw from the grid. I’ll use my own home’s electricity cost breakdown as an example (all listed prices, even the additional tax, include our 25.5 % VAT)

    1. Monthly base rate for your main breaker, depends on your grid operator – mine is 7.63€ for 3x25 A connection (among the cheapest grids in Finland, I previously used another example often seen in smaller cities, which is 29.71 €/month)
    2. Transfer costs, 0.0187 €/kWh during day, 0.0089 €/kWh during night
    3. Electricity tax, 0.0282752 €/kWh, includes national energy security taxes as well
    4. Cost of the actual electricity, typically ranges from -0.05 €/kWh to 0.20 €/kWh with yearly average being about 0.055 €/kWh
    5. Electricity company’s margin for spot prices, 0.004 €/kWh
    6. Electricity company’s base rate, 4.90 €/Month

    For many cities in Finland the base rate for grid connection is considerably higher, and especially for apartments tends to be the majority of your electricity bill outside major urban centers. Even in cities it makes up a large percentage, so there’s a big incentive to not overspec your service.


  • As a European those power draws listed sound absolutely absurd to me. I mean, I can easily believe you, but a stove pulling 50 A at 240 V, so 12 kW, sounds like a complete overkill in normal use. The dryer power use also sounds comically high, when viewed from a country where heat pump dryers are the norm.

    Let’s go for a standard single family home example. Level 2 charger is either 8 A (5.5 kW) or 16 A (11 kW) three phase. On top of that, typical sauna is 6-7.5 kW, 1-2 heat pumps (approx. 1.5 kW a piece), stove (8.5 kW max), water heater (2-3 kW), + other appliances like dishwasher, washing machine etc.

    It would seem like that easily trips the breaker, but you won’t be charging the car and warming up the sauna at the same time, unless opting to 5.5 kW charging. However, you typically charge the car at night, when the other things running are the heat pumps and the water heater – this will end up drawing around 16 kW total (in the worst case scenario) which fits in the limit. When you don’t count the car into the mix, there’s plenty of power to go around.

    There are multiple reasons behind this. One is our homes are relatively well insulated, which means that we can get by with a lot less AC and heating. Appliances in the EU are also generally more efficient – as an example, our dryers are typically based on heat pumps and pull a lot less amperage for the same performance. Lot of homes also don’t have a dryer. Stoves have generally lower power requirements as well, and practically never draw peak power. Here’s an example washer+dryer combo where the suggested fuse for the whole thing is 10 A (meaning 2.3 kW available for the combo).

    So listing the same appliances you have (at 230 V single phase equivalent for simplicity, i.e. 75 A available (3 * 25))

    • level 2 EV charger: 24-48 A depending on chosen speed
    • stove: 20 A
    • Heat pumps (also used for AC) worst case scenario approx. 15 A, practically only reached for longer periods in extreme cold
    • dryer and washing machine: 10 A
    • water heater: 16 A

    Which will result in 79 A total worst case or 103 A depending on the car charger spec. A bit over the 75 A available, and not calculating additional smaller loads like the microwave, kettle, TV, lighting etc. That worst case will in practice never be reached, though, and even the main breaker typically has some tolerance before it trips (usually main breaker is using a slow-blow fuse equivalent profile, which doesn’t immediately trip with a minor overload or a short spike). Our code mandates enough tolerance in wiring gauges that this doesn’t pose any risk.

    Why don’t we want the added headroom then? Upgrading the service from 3x25A to 3x35A isn’t really that expensive in urban areas, and can be done relatively simply? Well – Finns are stingy and depending on who happens to own your local distribution grid you can get heavily penalized monetarily in the long term, when upgrading the service to a higher tier. Caruna owns a lot of the Finnish distribution grid nowadays, and as an example from their pricing chart going from 3x25A to 3x35A raises your monthly base rate from 29.71 € to 51.68 €. That’s 240 € extra per year, which is a pretty high cost for a just in case that’s easily avoided. In cities that still have municipally owned distribution (Lahti, Turku, Helsinki as an example) the costs are typically much lower, both for upgrading the service and monthly costs, compared to the privately owned grids.





  • one of us

    1. Hadn’t considered that one TBH, no practical limits with actuations (rated in the thousands) but they’re probably not rated for that many trips under a fault condition – now I’m curious, will have to dig up a spec sheet at some point
    2. Not really, unless you have equipment that’s poorly designed everything should be fine. It’s not much different from a brownout, and things should be configured to deal with that anyways if you don’t have a UPS
    3. If there are a lot of reactive loads, then yes – e.g. electric motors, large capacitors. Those will have a large inrush when started again. Typically there isn’t that much reactive loading in a residential home though, and it should be covered by the latency designed into the breaker.

    The first point is actually a really good one, and one I didn’t really remember to consider. I’d guess it has at least something to do with that (and would explain why many homes around here are still configured with traditional fuses for the main connection – no need to worry about lifetime when you have to replace them anyways)


  • Not talking about the circuits, but the main electrical connection to the grid. To me it often seems like there’s reluctance in overcommitting overprovisioning that capacity: as an example, four 16A circuits on a 25A main breaker. Here that’s quite common, but even in Tech connections videos I’ve seen him bring up smart electric cabinets or automatic load monitoring when putting enough capacity on the mains to possibly go over.

    What I’m asking is, why bother? If you trip the mains by having too much load, just reset the breaker and be done with it. No need to automate things to not run into that situation, one will learn to not have the oven on while charging the car full blast. No need to gimp the charger amperage since you’re running a new circuit anyway, and it’s not like it’s much different running a 20A circuit vs a 40A one. If that’s 70% of your total available capacity, it doesn’t matter – worst you have to do is walk downstairs and flip a switch.




  • One thing I really don’t get in the discussion around EVs and charging is, why are people so afraid of tripping the main breaker? If you have a total of e.g. 17 kW available and happen to go over, just reset the main breaker (or replace it in case it’s still a traditional one). It’s there precisely so that you wouldn’t need to care about overloading the connection.

    In my experience people get by with a 3x25A (17 kW available, matches approximately a 70A service in the US) while using the available power to

    • heat/cool a single family home (in -20 °C weather mind you)
    • run all appliances (including the oven, stove, dryer etc.)
    • heat up a sauna
    • charge an EV
    • whatever else you typically would want to plug in, kettles and such

    While it’s true you can trip the main breaker if you have everything on at the same time, typically it never happens even if there are no lockouts in place preventing overuse. And it’s not like tripping it causes any permanent harm.

    Why is an electrical service upgrade constantly brought up as a solution when any home with >15 kW of available power won’t need it? Is it against code to purposefully overcommit your mains in the US or something?

    Edit: there were valid concerns raised over how long-lived the breakers are (probably won’t be rated for tens of fault-condition related trips), also that these smaller service specs aren’t as common as I’ve gathered from the media. That might have something to do with this at least. Thanks for the replies – it’s been an interesting discussion.


  • Yep – US also doesn’t generally do residential three-phase unlike many countries in the EU. A lot of garages around here have 3x16A 230V, not (only) due to the power requirements but because having three phases allows for simplest induction motors for things like blowers and circular saws. When you have three phases having a proper outlet in the garage starts making sense.

    Around here (Finland more specifically) we have three-phase even in most apartments. My two bedroom apartment has a 3x25A main breaker, and two devices on 3x16A circuit’s – the sauna stove and oven+stovetop. Most single-family homes have 3x25A or 3x36A as well.

    US households are missing out on a lot of things due to their split-phase system.







  • Don’t seem to be any disk reads on request at a glance, though that might just be due to read caching on OS level. There’s a spike on first page refresh/load after dropping the read cache, so that could indicate reading the file in every time there’s a fresh page load. Would have to open the browser with call tracing to be sure, which I’ll probably try out later today.

    For my other devices I use unbound hosted on the router, so this is the first time encountering said issue for me as well.


  • You’re using software to do something it wasn’t designed to do

    As such, Chrome isn’t exactly following the best practices either – if you want to reinvent the wheel at least improve upon the original instead of making it run worse. True, it’s not the intended method of use, but resource-wise it shouldn’t cause issues – at this point one would’ve needed active work to make it run this poorly.

    Why would you even think to do something like this?

    As I said, due to company VPN enforcing their own DNS for intranet resources etc. Technically I could override it with a single rule in configuration, but this would also technically be a breach of guidelines as opposed to the more moderate rules-lawyery approach I attempt here.

    If it was up to me the employer should just add some blocklist to their own forwarder for the benefit of everyone working there…

    But guess I’ll settle for local dnsmasq on the laptop for now. Thanks for the discussion 👌🏼


  • TLDR: looks like you’re right, although Chrome shouldn’t be struggling with that amount of hosts to chug through. This ended up being an interesting rabbit hole.

    My home network already uses unbound with proper blocklist configured, but I can’t use the same setup directly with my work computer as the VPN sets it’s own DNS. I can only override this with a local resolver on the work laptop, and I’d really like to get by with just systemd-resolved instead of having to add dnsmasq or similar for this. None of the other tools I use struggle with this setup, as they use the system IP stack.

    Might well be that chromium has a bit more sophisticated a network stack (than just using the system provided libraries), and I remember the docs indicating something about that being the case. In any way, it’s not like the code is (or should be) paging through the whole file every time there’s a query – either it forwards it to another resolver, or does it locally, but in any case there will be a cache. That cache will then end up being those queried domains in order of access, after which having a long /etc/hosts won’t matter. Worst case scenario after paging in the hosts file initially is 3-5 ms (per query) for comparing through the 100k-700k lines before hitting a wall, and that only needs to happen once regardless of where the actual resolving takes place. At a glance chrome net stack should cache queries into the hosts file as well. So at the very least it doesn’t really make sense for it to struggle for 5-10 seconds on every consecutive refresh of the page with a warm DNS cache in memory…

    …or that’s how it should happen. Your comment inspired me to test it a bit more, and lo: after trying out a hosts file with 10 000 000 bogus entries chrome was brought completely to it’s knees. However, that amount of string comparisons is absolutely nothing in practice – Python with its measly linked lists and slow interpreter manages comparing against every row in 300 ms, a crude C implementation manages it in 23 ms (approx. 2 ms with 1 million rows, both a lot more than what I have appended to the hosts file). So the file being long should have nothing to do with it unless there’s something very wrong with the implementation. Comparing against /etc/hosts should be cheap as it doesn’t support wildcard entires – as such the comparisons are just simple 1:1 check against first matching row. I’ll continue investigating and see if there’s a quick change to be made in how the hosts are read in. Fixing this shouldn’t cause any issues for other use cases from what I see.

    For reference, if you want to check the performance for 10 million comparisons on your own hardware:

    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <sys/time.h>
    
    
    int main(void) {
    	struct timeval start_t;
    	struct timeval end_t;
    
    	char **strs = malloc(sizeof(char *) * 10000000);
    	for (int i = 0; i < 10000000; i++) {
    		char *urlbuf = malloc(sizeof(char) * 50);
    		sprintf(urlbuf, "%d.bogus.local", i);
    		strs[i] = urlbuf;
    	}
    
    	printf("Checking comparisons through array of 10M strings.\n");
    	gettimeofday(&start_t, NULL);
    
    	for (int i = 0; i < 10000000; i++) {
    		strcmp(strs[i], "test.url.local");
    	}
    
    	gettimeofday(&end_t, NULL);
    
    	long duration = (end_t.tv_usec - start_t.tv_usec) / 1000;
    	printf("Spent %ld ms on the operation.\n", duration);
    
    	for (int i = 0; i < 10000000; i++) {
    		free(strs[i]);
    	}
    	free(strs);
    }