Alarm-evt performance difference between windows 10 and ubuntu 23.04

Hi.

I have a question about alarm-evt.

Below is example code.

(module b racket
  (define (f)
    (sync/enable-break (handle-evt (alarm-evt (+ (current-inexact-milliseconds)
                                                 (random 500 1000 (current-pseudo-random-generator))))
                                   (lambda (a) (f)))))
  (for ([i 200])
    (thread (lambda () (f)))))

With my i7-6700 cpu, when it was on windows 10, cpu load was about 4%, but when it was on ubuntu 23.04, cpu load was about 40%.

Did i do something wrong?

Thanks for reading.

For me on Debian 12 with an i7-8550u the racket process shows around 4%.

Hi.

At first, I have to admit that I used a performance measuring means incorrectly.

The utility that I used is htop and I thought the column CPU% which has column name PERCENT_CPU was answer.
But, actually the answer was the column NCPU% which has column name PERCENT_NORM_CPU and cpu load was about 4%.

Sorry for bad english writing and thanks for reply.

1 Like