server/process: Don't send heartbeats when no idle functions
PATCH 1/2 server/process: Don't send heartbeats when no idle functions
If there are no idle functions present, don't sent heartbeat events. These are only meant to happen while builds are active.
--- lib/bb/server/process.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/server/process.py +1 -1
@@ -477,7 +477,7 @@ class ProcessServer(): # Create new heartbeat event? now = time.time() - if bb.event._heartbeat_enabled and now >= self.next_heartbeat: + if items and bb.event._heartbeat_enabled and now >= self.next_heartbeat: # We might have missed heartbeats. Just trigger once in # that case and continue after the usual delay. self.next_heartbeat += self.heartbeat_seconds
PATCH 2/2 server/process: Decrease idle/main loop frequency
The idle and main loops have socket select calls to know when to execute. This means we can increase the normal timeout frequency since this is just a fall back and have some small efficiency gains.
--- lib/bb/server/process.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
lib/bb/server/process.py +2 -2
@@ -329,7 +329,7 @@ class ProcessServer(): bb.error("Idle thread terminated, main thread exiting too") self.quit = True - nextsleep = 0.1 + nextsleep = 1.0 if self.xmlrpc: nextsleep = self.xmlrpc.get_timeout(nextsleep) try:
@@ -439,7 +439,7 @@ class ProcessServer(): self.idle_cond.notify_all() while not self.quit: - nextsleep = 0.1 + nextsleep = 1.0 fds = [] with bb.utils.lock_timeout(self._idlefuncsLock):
Re: [bitbake-devel] [PATCH 2/2] server/process: Decrease idle/main loop frequency
Quoted 5 lines · Richard Purdie
The idle and main loops have socket select calls to know when to execute. This means we can increase the normal timeout frequency since this is just a fall back and have some small efficiency gains.
Signed-off-by Richard Purdie <[email protected]>
Hi Richard,
This patch set does not apply cleanly on master nor on my master-next. I believe it misses the "Merge a function to simplfy code" from your master-next branch.
Signature · 3 lines
Mathieu Dubois-Briand, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Re: [bitbake-devel] [PATCH 2/2] server/process: Decrease idle/main loop frequency
Quoted 7 lines · Mathieu Dubois-Briand
Quoted 6 lines · Richard Purdie
The idle and main loops have socket select calls to know when to execute.
This means we can increase the normal timeout frequency since this is
just a fall back and have some small efficiency gains.
Quoted 8 lines
Quoted 1 line
Signed-off-by Richard Purdie <[email protected]>Hi Richard,
This patch set does not apply cleanly on master nor on my master- next. I
believe it misses the "Merge a function to simplfy code" from your master-next branch.
Sorry, I've sent that one as well. I need to stop missing a single patch like this!
Cheers,
Richard