• 21 Posts
  • 660 Comments
Joined 2 years ago
cake
Cake day: July 5th, 2023

help-circle



  • It’s beautiful. They’re using the capitalist incentive model to drive production capacity and drive cost down at an extraordinary pace, producing vehicles at non-profit prices. That means the vast majority of Chinese consumers and businesses end up with high quality, non-poluting vehicles at extremely low costs. Which leaves more money in their pockets for other economic activities. At the same time this speeds up the EV transition and keeps people working. The famed competitive markets that lower prices for consumers that we’ve all heard about but almoat never experienced? These guys engineer them where and when needed. And yeah, competition is terrible for business owners because their profit interest is opposed to the interest of their customers to pay less. But it’s beneficial for society as a whole because most people are consumers / workers.

    If you ever wonder why it’s cheaper to produce in China even though manufacturing workers get USD $15-16K a year at present, which is similar to Eastern Europe, that’s a major reason. The costs are lower across the board. When PCBWay needs a transport van to haul product, it costs significantly less than it would in the EU, because the Chinese autos can’t tack on hefty profit margins. And that’s on top of all the components inside that van, whose manufacturers are likely also unable to make significant profits. In the US auto industry, the cost of labour is typically under 15% of the manufacturing cost. Everything else is costs of inputs with their embedded profits and auto manufacturer profits. And so PCBWay can afford to offer you lower prices for your PCB orders. An EU PCB manufacturer could not because they paid 50% more for their vans. Extrapolate for all other tools and materials they have to acquire to make a PCB, placement robots, soldering ovens, CNC, etc.

    E: Meanwhile the price of the F-150, a staple vehicle used throughout the trades and industry in the US and Canada:

    Src



  • It’s a CPU and chipset bug. AMD CPUs have built-in IO chipset that provides USB among other things. Most chipsets other than X570 use a different IO chip with different performance characteristics. The X570 chipset contains the same IO chip that the CPUs have so it’s got the same characteristics. Depending the board some ports might be wired to the CPU others to the chipset. It’s hard to know. The only certain combination is that a X570 boards have this issue. I don’t know what USB chip is contained in the Threadripper boards. Either way, you use your board and if you notice USB dropouts when using high-bandwidth applications, get a PCIe controller for that. There’s no other solution and there’s no point spending time trying to workaround it. You can find many reports on the web. I was hit by this and tried even different boards till I finally gave up and got a add-in card. The AM5 platform seems to not suffer from this. I’m using the onboard USB controller on a X870 board at the moment. There’s ptobably not much point of getting Intel just for this. I considered that and the performance per dollar was still much better on AMD even if having to buy a USB PCIe controller.



  • I am also thinking about this in terms of reserving people’s time. If people decide to take longer to do stuff there’s little you can do to counter that without going down the arduous path of performance metrics, monitoring and evaluations. People can tweak their productivity over 955 regular working schedules where tasks just take longer and project comoletion times stretch further. They just take more free time within the regular schedule. So I suggest time-proportional pay only under the condition where we decide to let some people reserve more of their time to this activity of doing work. But perhaps we don’t want that as there are other side effects too.


  • You just don’t do that. You assume everyone is doing avg productivity for their job. Otherwise you enter the fools errand of performance measurements and evaluation. Assume avg productivity, pay the person who wants to spend 5 days a week proportionally more than the person spending 4 days a week. Or 8hrs vs 6hrs, and so on. Only if you want to allow for some poeple to work more than others. Maybe you don’t. Maybe we shouldn’t.









  • 0 4   *   *   *    /usr/sbin/reboot
    

    Adjust interval as needed.

    Or if you want something a bit faster and less disruptive:

    #!/bin/sh
    
    NAME="$0"
    
    logger_cmd () {
      echo $@
      logger -p daemon.info -t "$NAME[$$]" $@
    }
    
    if ! which ncat 1>/dev/null
    then
      logger_cmd "ncat not found, installing..."
      opkg update && opkg install ncat
    fi
    
    chk_conn () {
      echo "Checking connectivity to $@"
      if ncat --send-only --recv-only -w 334ms $@ 2>/dev/null; then
        return 0
      fi
    
      logger_cmd "Cannot reach $@"
      return 1
    }
    
    restart_network_iface() {
        # TODO: Don't restart every minute
    
        COOLDOWN_LOCK=/tmp/internet-connectivity-watchcat.tmp
        COOLDOWN_SECONDS=300
    
        cooldown_time_end=$(cat $COOLDOWN_LOCK || echo 0)
    
        time_now="$(cat /proc/uptime)"
        time_now="${time_now%%.*}"
    
        cooldown_time_left=$((cooldown_time_end - time_now))
    
        if [ "$cooldown_time_left" -lt "1" ]
        then
            logger_cmd "Restarting network interface: \"$1\"."
            ifdown "$1"
            ifup "$1"
    
            cooldown_time_end=$((time_now + COOLDOWN_SECONDS))
            echo $cooldown_time_end > $COOLDOWN_LOCK
        else
            logger_cmd "Skipping interface \"$1\" restart due to cooldown. Cooldown left: $cooldown_time_left seconds"
        fi
    }
    
    
    logger_cmd "Checking internet connectivity..."
    
    if   chk_conn google.com 443 \
      || chk_conn amazon.com 443 \
      || chk_conn facebook.com 443 \
      || chk_conn cloudflare.com 443 \
      || chk_conn telekom.de 443
    then
      logger_cmd "Connected to internet."
    else
      logger_cmd  "Not connected to internet."
      restart_network_iface "$1"
    fi
    

    In restart_network_iface use /usr/sbin/reboot instead of interface up/down and run the script every few minutes via cron or systemd timer. This was written for OpenWrt so if you use that you can use it as-is. For other systems you’d also have to adjust the logger_cmd.

    You can place that on another machine and send a signal to a smart plug instead if you’re worried of a locked up / frozen router. That said if your router freezes like that, you should probably change it and you should be able to run this script on it.