HN user

matdehaast

532 karma

[ my public key: https://keybase.io/matdehaast; my proof: https://keybase.io/matdehaast/sigs/bVixwtMdXbUG3YY_rdEK8RW0jK3WXzVZ5NU4n7JpolE ]

Posts9
Comments140
View on HN

Thanks for the code and clarification. I'm surprised the TB team didn't pick it up, but your individual transfer test is a pretty poor representation. All you are testing there is how many batches you can complete per second, giving no time for the actual client to batch the transfers. This is because when you call createTransfer in GO, that will synchronously block.

For example, it is as if you created an HTTP server that only allows one concurrent request. Or having a queue where only 1 worker will ever do work. Is that your workload? Because I'm not sure I know of many workloads that are completely sync with only 1 worker.

To get a better representation for individual_transfers, I would use a waitgroup

  var wg sync.WaitGroup
  var mu sync.Mutex
  completedCount := 0

  for i := 0; i < len(transfers); i++ {
    wg.Add(1)
    go func(index int, transfer Transfer) {
     defer wg.Done()

     res, _ := client.CreateTransfers([]Transfer{transfer})
     for _, err := range res {
      if err.Result != 0 {
       log.Printf("Error creating transfer %d: %s", err.Index, err.Result)
      }
     }

     mu.Lock()
     completedCount++
     if completedCount%100 == 0 {
      fmt.Printf("%d\n", completedCount)
     }
     mu.Unlock()
    }(i, transfers[i])
   }

  wg.Wait()
  fmt.Printf("All %d transfers completed\n", len(transfers))
This will actually allow the client to batch the request internally and be more representative of the workloads you would get. Note, the above is not the same as doing the batching manually yourself. You could call createTransfer concurrently the client in multiple call sites. That would still auto batch them

I'm a bit worried you think instantiating a new client for every request is common practice. If you did that to Postgres or MySQL clients, you would also have degradation in performance.

PHP has created mysqli or PDO to deal with this specifically because of the known issues of it being expensive to recreate client connects per request

I'm talking specifically about their mobile lineup, not desktop. And more specifically the performance to power efficiency the M series is getting. It is more than 2 generations behind.

It feels like Intel and AMD are asleep at the wheel with their mobile lineup. I've been looking at non-apple equivalents that have similar performance/power as the M lineup and it seems they all lag about 20%+.

For $800 the M4 Air just seems like one of the best tech deals around.

Enum of Arrays 2 years ago

I spent 2 seconds clicking on your bio and saw this account was created 4 hours ago.

Makes me wonder why you felt the need to create a burner account.

This isn't to say anything one way or another about you, its just my 2 second of reading about you.

I find it a very interesting approach to what she is doing.

The problem with most philanthropic organizations is that they come to rely on a constant stream of money. I've heard the Gates Foundation have to be very intentional with how they deploy capital. Because whole ecosystems come to rely on that money in an unsustainable way. So when they have met their goals or decided its not working and pull funding, those that relied on the funding basically collapse overnight. Which could lead to even worse outcomes.

With her approach, I do wonder if this will occur with many of the organizations she is giving large amount of money to.

EDIT: Reminds me of the saying "Give a person a fish and you feed him for a day. Teach him how to fish and you feed him for a lifetime".

.NET 9 Is Out 2 years ago

Memory usage for that synthetic web server benchmark is massive! 90% reduction