Jira (FACT-2819) (experimental) Revert parallel resolution of facts

0 views
Skip to first unread message

Bogdan Irimie (Jira)

unread,
Sep 30, 2020, 10:15:04 AM9/30/20
to puppe...@googlegroups.com
Bogdan Irimie created an issue
 
Facter / Task FACT-2819
(experimental) Revert parallel resolution of facts
Issue Type: Task Task
Assignee: Unassigned
Created: 2020/09/30 7:14 AM
Priority: Normal Normal
Reporter: Bogdan Irimie

Revert parallel resolution of facts and run performance test.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Bogdan Irimie (Jira)

unread,
Sep 30, 2020, 10:33:03 AM9/30/20
to puppe...@googlegroups.com

Bogdan Irimie (Jira)

unread,
Sep 30, 2020, 10:33:04 AM9/30/20
to puppe...@googlegroups.com
Bogdan Irimie updated an issue
Change By: Bogdan Irimie
Sprint: ready for triage ghost-7.10

Bogdan Irimie (Jira)

unread,
Oct 7, 2020, 9:05:04 AM10/7/20
to puppe...@googlegroups.com
Bogdan Irimie updated an issue
Change By: Bogdan Irimie
Sprint: ghost-7.10 , ready for triage 2

Bogdan Irimie (Jira)

unread,
Oct 14, 2020, 10:04:05 AM10/14/20
to puppe...@googlegroups.com
Bogdan Irimie updated an issue
Change By: Bogdan Irimie
Sprint: ghost-7.10, ghost-14.10 , ready for triage 2

Bogdan Irimie (Jira)

unread,
Oct 16, 2020, 9:49:03 AM10/16/20
to puppe...@googlegroups.com

Bogdan Irimie (Jira)

unread,
Oct 21, 2020, 9:11:03 AM10/21/20
to puppe...@googlegroups.com
Bogdan Irimie updated an issue
Change By: Bogdan Irimie
Sprint: ghost-7.10, ghost-14.10, ghost-21.10 , PR - Triage 2

Bogdan Irimie (Jira)

unread,
Oct 22, 2020, 7:21:03 AM10/22/20
to puppe...@googlegroups.com

Bogdan Irimie (Jira)

unread,
Oct 28, 2020, 5:25:04 AM10/28/20
to puppe...@googlegroups.com

Platform: ubuntu 20.04 x64
Ruby: ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]

Code used to test thread creation

def start_threds
  threads = []
  (1..100).each do
    threads << Thread.new do
      while true
      end
    end
  end
 
  threads
end
 
def join_threads(threads)
  threads.each do |thread|
    thread.join
    puts "joined_thread"
  end
end
 
threads = start_threds
 
puts "created #{threads.length} threads"
join_threads(threads)

Number of thread created: 101

ps aux | grep test2
root        2820 99.6  1.2 1268596 101368 pts/1  Sl+  09:23   0:04 ruby test2.rb
 
ps -e -T | grep 2820 | wc -l
101

Bogdan Irimie (Jira)

unread,
Oct 28, 2020, 5:26:03 AM10/28/20
to puppe...@googlegroups.com
Bogdan Irimie updated an issue
Change By: Bogdan Irimie
Attachment: Screenshot 2020-10-28 at 11.25.03.png

Bogdan Irimie (Jira)

unread,
Oct 28, 2020, 5:27:03 AM10/28/20
to puppe...@googlegroups.com
Bogdan Irimie updated an issue
Change By: Bogdan Irimie
Attachment: Screenshot 2020-10-28 at 11.26.15.png

Bogdan Irimie (Jira)

unread,
Oct 28, 2020, 10:10:03 AM10/28/20
to puppe...@googlegroups.com
Bogdan Irimie updated an issue
Change By: Bogdan Irimie
Sprint: ghost-7.10, ghost-14.10, ghost-21.10, ghost-28.10 , PR - Triage 2

Bogdan Irimie (Jira)

unread,
Oct 28, 2020, 11:43:03 AM10/28/20
to puppe...@googlegroups.com
 
Re: (experimental) Revert parallel resolution of facts

Test script

#!/usr/bin/ruby
 
def start_threds
  threads = []
  (1..8000).each do
    threads << Thread.new do
      sleep 100
      #while true
        #input = 999999999
        #BigMath.PI(input).to_s
      #end
    end
  end
 
  threads
end
 
def join_threads(threads)
  threads.each do |thread|
    thread.join
    puts "joined_thread"
  end
end
 
threads = start_threds
 
puts "created #{threads.length} threads"
join_threads(threads)

With 8000 threads it works

./test2.rb
created 8000 threads

With 9000 threads it kills the process

./test2.rb
Killed

Bogdan Irimie (Jira)

unread,
Oct 29, 2020, 6:09:04 AM10/29/20
to puppe...@googlegroups.com

When running in sequential mode, Facter 4 creates a total of 142 threads. The threads are crated because execution reads stderr and stdout on separate threads and the timer used for timeouts creates a thread as well.

When running Facter 4 in parallel mode, a total of 248 threads are created.

Bogdan Irimie (Jira)

unread,
Nov 5, 2020, 9:23:03 AM11/5/20
to puppe...@googlegroups.com
Bogdan Irimie updated an issue
Change By: Bogdan Irimie
Release Notes: Not Needed Enhancement
Release Notes Summary: In order to improve performance, we resolve facts in parallel (concurrently on MRI ruby and in parallel on JRuby).

Mihai Buzgau (Jira)

unread,
Nov 5, 2020, 9:40:03 AM11/5/20
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Fix Version/s: FACT 4.0.45

Claire Cadman (Jira)

unread,
Nov 10, 2020, 5:58:03 AM11/10/20
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages