J
J. Wook
Strange ruby network performance drop examined on Ubuntu.
I made a simple HTTP testing code like below.
redirect_url = "http://www.talk-with-hani.com/feed"
success_url = "http://www.daum.net"
invalid_url = "http://www.daauumm.net"
error_url = "http://errorurl1234.tistory.com"
start_time = Time.now
downloaded = 0
5.times do
begin
uri = URI.parse(redirect_url)
r = Net::HTTP.get_response(uri)
c += r.body.size
rescue Exception => e
puts e.class
end
... iterate for success_url, invalid_url, error_url
end
puts "Total: #{downloaded/1000} KB, #{Time.now - start_time} seconds"
Result was... very strange.
time
MacBook about 20 sec
FreeBSD6.1 about 11 sec
Ubuntu about 73 sec (What's wrong with it?????)
(ruby1.8.6, same h/w spec of FreeBSD and Ubuntu)
I couldn't find any configuration difference (dependent library, ruby
version... etc)
Why this strange performance drop occurs on Ubuntu?
Please help me to fix Ubuntu performance problem.
I made a simple HTTP testing code like below.
redirect_url = "http://www.talk-with-hani.com/feed"
success_url = "http://www.daum.net"
invalid_url = "http://www.daauumm.net"
error_url = "http://errorurl1234.tistory.com"
start_time = Time.now
downloaded = 0
5.times do
begin
uri = URI.parse(redirect_url)
r = Net::HTTP.get_response(uri)
c += r.body.size
rescue Exception => e
puts e.class
end
... iterate for success_url, invalid_url, error_url
end
puts "Total: #{downloaded/1000} KB, #{Time.now - start_time} seconds"
Result was... very strange.
time
MacBook about 20 sec
FreeBSD6.1 about 11 sec
Ubuntu about 73 sec (What's wrong with it?????)
(ruby1.8.6, same h/w spec of FreeBSD and Ubuntu)
I couldn't find any configuration difference (dependent library, ruby
version... etc)
Why this strange performance drop occurs on Ubuntu?
Please help me to fix Ubuntu performance problem.