Fixing Threads in Ruby 1.8: A 2-10x performance boost
timetobleed.com
Fixing Threads in Ruby 1.8: A 2-10x performance boost
1–10 of 15 posts
Re: Fixing Threads in Ruby 1.8: A 2-10x performance boost
#2I'd be curious to see the rest of the benchmarks.
Re: Fixing Threads in Ruby 1.8: A 2-10x performance boost
#3Re: Fixing Threads in Ruby 1.8: A 2-10x performance boost
#4Does anyone know what Ruby 1.9 does for creating threads? Does it do something similar to what the author does, or something else entirely?
Ruby 1.9 uses libpthread which creates stacks for its threads in a similar way (mmap and a guard page).
Re: Fixing Threads in Ruby 1.8: A 2-10x performance boost
#5Does anyone know what Ruby 1.9 does for creating threads? Does it do something similar to what the author does, or something else entirely?
Hi. Author here. Ruby 1.9 uses libpthread which creates stacks for its threads in a similar way (mmap and a guard page).
Re: Fixing Threads in Ruby 1.8: A 2-10x performance boost
#6Earlier quoted context omitted.
Hi. Author here. Ruby 1.9 uses libpthread which creates stacks for its threads in a similar way (mmap and a guard page).
You mean it calls pthread_create for every Ruby thread? That would mean threads are no longer green threads, since both of the widely used Pthread libraries on Linux (Linuxthreads on 2.4 versions of the kernel, and NTPL on 2.6) have a 1-to-1 mapping of POSIX threads to kernel threads.
Re: Fixing Threads in Ruby 1.8: A 2-10x performance boost
#7wow this is a superb post. I wonder why anyone would really want to take the trouble to move to ruby 1.9 anymore... I'd be curious to see the rest of the benchmarks.
Re: Fixing Threads in Ruby 1.8: A 2-10x performance boost
#8wow this is a superb post. I wonder why anyone would really want to take the trouble to move to ruby 1.9 anymore... I'd be curious to see the rest of the benchmarks.
I'm curious why someone would go through the trouble to stay on 1.8?
Re: Fixing Threads in Ruby 1.8: A 2-10x performance boost
#9wow this is a superb post. I wonder why anyone would really want to take the trouble to move to ruby 1.9 anymore... I'd be curious to see the rest of the benchmarks.
Edit: Remembered based on ice799's comment below that in 1.9 the threads still won't be allowed to operate in parallel, which neuters most of the aforementioned benefits to using native threads.
Re: Fixing Threads in Ruby 1.8: A 2-10x performance boost
#10Earlier quoted context omitted.
I'm curious why someone would go through the trouble to stay on 1.8?
Library compatibility. Many libraries are still not compatible with 1.9. It's good to have interim improvements for 1.8 until the ecosystem has caught up with 1.9, because 1.8 is what actually powers production systems today.
It's not likely they will remain so for very long