Remove the priority scheudler
As I'm not sure it's helping.
This commit is contained in:
parent
8a08c725b3
commit
31f226cd46
1 changed files with 3 additions and 37 deletions
|
|
@ -112,37 +112,9 @@
|
||||||
#:unwind? #t)
|
#:unwind? #t)
|
||||||
|
|
||||||
(let ((finished? (make-condition))
|
(let ((finished? (make-condition))
|
||||||
(priority-scheduler #f)
|
|
||||||
(request-scheduler #f))
|
(request-scheduler #f))
|
||||||
(call-with-sigint
|
(call-with-sigint
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(call-with-new-thread
|
|
||||||
(lambda ()
|
|
||||||
(run-fibers
|
|
||||||
(lambda ()
|
|
||||||
(let* ((current (current-scheduler))
|
|
||||||
(schedulers
|
|
||||||
(cons current (scheduler-remote-peers current))))
|
|
||||||
|
|
||||||
(set! priority-scheduler current)
|
|
||||||
|
|
||||||
(for-each
|
|
||||||
(lambda (i sched)
|
|
||||||
(spawn-fiber
|
|
||||||
(lambda ()
|
|
||||||
(catch 'system-error
|
|
||||||
(lambda ()
|
|
||||||
(set-thread-name
|
|
||||||
(string-append "priority " (number->string i))))
|
|
||||||
(const #t)))
|
|
||||||
sched))
|
|
||||||
(iota (length schedulers))
|
|
||||||
schedulers))
|
|
||||||
|
|
||||||
(wait finished?))
|
|
||||||
#:hz 0
|
|
||||||
#:parallelism 1)))
|
|
||||||
|
|
||||||
(run-fibers
|
(run-fibers
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(let* ((current (current-scheduler))
|
(let* ((current (current-scheduler))
|
||||||
|
|
@ -161,9 +133,6 @@
|
||||||
(iota (length schedulers))
|
(iota (length schedulers))
|
||||||
schedulers))
|
schedulers))
|
||||||
|
|
||||||
(while (not priority-scheduler)
|
|
||||||
(sleep 0.1))
|
|
||||||
|
|
||||||
(let ((requests-metric
|
(let ((requests-metric
|
||||||
(make-counter-metric registry "requests_total")))
|
(make-counter-metric registry "requests_total")))
|
||||||
|
|
||||||
|
|
@ -191,8 +160,7 @@ port. Also, the port used can be changed by passing the --port option.\n"
|
||||||
#:idle-seconds 5
|
#:idle-seconds 5
|
||||||
#:destructor
|
#:destructor
|
||||||
(lambda (conn)
|
(lambda (conn)
|
||||||
(close-postgresql-connection conn "background"))
|
(close-postgresql-connection conn "background"))))
|
||||||
#:scheduler priority-scheduler))
|
|
||||||
|
|
||||||
(connection-pool
|
(connection-pool
|
||||||
(make-resource-pool
|
(make-resource-pool
|
||||||
|
|
@ -208,8 +176,7 @@ port. Also, the port used can be changed by passing the --port option.\n"
|
||||||
(close-postgresql-connection conn "web"))
|
(close-postgresql-connection conn "web"))
|
||||||
#:default-max-waiters (floor (/ postgresql-connections 2))
|
#:default-max-waiters (floor (/ postgresql-connections 2))
|
||||||
#:default-checkout-timeout (/ postgresql-statement-timeout
|
#:default-checkout-timeout (/ postgresql-statement-timeout
|
||||||
1000)
|
1000)))
|
||||||
#:scheduler priority-scheduler))
|
|
||||||
|
|
||||||
(reserved-connection-pool
|
(reserved-connection-pool
|
||||||
(make-resource-pool
|
(make-resource-pool
|
||||||
|
|
@ -224,8 +191,7 @@ port. Also, the port used can be changed by passing the --port option.\n"
|
||||||
(lambda (conn)
|
(lambda (conn)
|
||||||
(close-postgresql-connection conn "web-reserved"))
|
(close-postgresql-connection conn "web-reserved"))
|
||||||
#:default-max-waiters postgresql-connections
|
#:default-max-waiters postgresql-connections
|
||||||
#:default-checkout-timeout 6
|
#:default-checkout-timeout 6)))
|
||||||
#:scheduler priority-scheduler)))
|
|
||||||
|
|
||||||
(let ((resource-pool-checkout-failures-metric
|
(let ((resource-pool-checkout-failures-metric
|
||||||
(make-counter-metric registry
|
(make-counter-metric registry
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue