Index

Show enters and exits. Hide enters and exits.

00:30:49burkelibbeySo as a totally random experiment, I'm rewriting a class's inheritance hierarchy to add Class#exclude(module). It works, but methods that have previously been called still have their lookup cached, apparently.
00:31:05burkelibbeyIs there any way to clear the method lookup cache? or am I misinterpreting what's happening?
00:32:50evanburkelibbey: Rubinius::VM.reset_method_cache(name)
00:34:09burkelibbeywicked, thanks!
00:34:25burkelibbeyoff to the pub for hack night :) back in 15
00:34:31evan:D
00:35:33imajesnice
00:35:36imajesooh
00:35:40imajesthat reminds me to call coachella
00:36:01brixenheh, which part, the reset method cache?
00:36:20brixenis your #todo method cached and stale?
00:42:14kronos_vanoevan, Are you sure that it related defined? I think it more related undef than define?
00:42:21kronos_vano that's what I got: http://gist.github.com/295273
00:42:31evanwell
00:42:37evanit's defined? thats giving you the wrong answer
00:42:41evanso yes, it's a defined? spec.
00:42:45kronos_vanook
00:43:08evanug
00:43:08evanno
00:43:13evanthat gist is bad
00:43:13evanbad
00:43:20evandon't reuse my other fixture
00:43:26evanwrite another one
00:43:27brixenkronos_vano: can you please separate whitespace change from code change also
00:43:34evanin the defined fixture file
00:44:07kronos_vanosorry sorry sorry
00:44:22brixenit's ok, just giving you feedback
00:45:04evanyou shouldn't have any changes to fixtures/super.rb
00:46:39kronos_vanoI should create fixtures/defined.rb with my example and use it. Rigth?
00:46:47kronos_vano*right
00:49:09evanyes
00:50:11evanI really want holochat.
01:43:52tonyhey guys, anyone encountered problems with mysql gem when serving a rails app via rbx script/server
01:45:29tonyhere's the error if anyone is interested: http://pastie.org/810401
01:48:41evantony_: hm, ok, looks like we're missing something in capi
01:48:49evantony_: would you do
01:49:01evanbin/rbx gem list
01:49:07evanand pastie the output
01:49:22tonyevan: sure thing, thanks for help
01:50:20tonyhttp://pastie.org/810406
01:50:58evanok
01:54:30kronos_vanorb_define_global_const call rb_define_const with rb_cObject. pretty simple to implement it in rubinius. But there is no specs for it.
01:56:21tonyyeah, i just tried rubinius today, still too fresh, but wanna dig into it.. btw, great work evan & the crew!
01:58:43tonylol, btw fib is super fast, > 1.9.1 > 1.8.7. I'm loving it!
02:00:54evan:D
02:01:07evanadding rb_define_global_const is trivial
02:01:09evani'll do it now.
02:01:15evantony_: you using rubinius from git?
02:01:29tonyyep
02:01:33evank
02:10:02evantony_: did you have any troubles getting all those gems installed?
02:11:21boyscoutAdd rb_define_global_const to C-API - 6db232e - Evan Phoenix
02:11:50tonyevan, webrat won't install, i can pastie the errors if you want
02:11:51evantony_: you'll need to run rake again after you update
02:12:00evanand also you'll probably need to reinstall the mysql gem
02:12:07tonyevan, i am on it
02:12:08evanto force it to relink
02:12:16evanyeah, i'll take the errors from webrat
02:15:43tonyevan, i have some progress on mysql, but it continues to whine: /opt/rubinius/gems/1.8/gems/mysql-2.8.1/lib/mysql_api.so: undefined symbol: rb_big2ll
02:15:54evanok, missing a few more things
02:16:00evanthanks for working through this with me
02:16:06evani don't have the mysql bindings installed here to test locally
02:16:10evanmaybe I should do that...
02:16:21evantony_: are you on OS X?
02:16:24boyscoutCI: rubinius: 6db232e successful: 3041 files, 11843 examples, 36124 expectations, 0 failures, 0 errors
02:16:24tonyevan, no prob at all.. i kinda hate to bug you
02:16:32evantony_: nah, no problem at all.
02:16:32tonyI'm on Ubuntu 9.10 x64
02:16:38evanyou're helping us flush things out.
02:17:01tonyno prob at all, glad i can help
02:17:07evanhm
02:17:22evani'm trying to recall how you force linux to binding all the dynamic symbols on load rather than lazily...
02:17:32evanthat way we'll be able to see all the missing functions at once.
02:18:23evanah
02:18:27evanrun this
02:18:40evanLD_BIND_NOW=1 <command to run rails>
02:20:43tonyevan, i ran it, still the same output: http://pastie.org/810441
02:21:03evanmm
02:21:03evanok
02:23:25tonywebrat output greater than 100k, pastie won't take it.. anyone knows an alternative?
02:23:38evangist
02:23:45evani might not need tho whole thing
02:23:48evanis there a backtrace in there?
02:23:51evanprobably toward the end
02:24:42tonywebrat http://gist.github.com/295421
02:24:50tonyoops too late :)
02:25:52tonyjust a note, nokogiri installed with no probs
02:26:24evanhm
02:26:25evanthats weird
02:26:31evandoes webrat contain nokogiri inside it?
02:26:39evanoh wait
02:26:40evanthose are warnings
02:26:41evani see.
02:27:04evanwell
02:27:09evanyour gist has nokogiri not installing
02:27:10tonyyeah, line 1352 refers to nokogiri: make: *** [nokogiri.so] Error 1
02:27:32evanis 1.4.1 the latest nokogiri?
02:28:12tonyit did pull it though, as you may see in the gem list.. didn't install it explicitly it was there after webrat failure
02:28:21tonyi'll check for nokogiri
02:30:13kronos_vanoYep 1.4.1 is latest (/ 2009/12/10)
02:31:12tonyouch, my bad.. nokogiri did not install, it fails.. mixed it up with 1.8's gem repo.. sorry about that
02:31:20evantony_: np.
02:31:26evannokogiri should work
02:31:32evani spent some time with those guys on it...
02:31:37tonyevan, do you want nokogiri's error output
02:31:39evanwe'll need to ask them about it
02:31:45tonyok
02:36:24boyscoutAdd rb_big2ll to C-API - e8549a9 - Evan Phoenix
02:36:27evanok, i went through the mysql C code
02:36:30evani think we got them all
02:36:34evanupdate and give that a shot.
02:37:12tonyk
02:37:35evanhm
02:37:37evanjust did
02:37:42evanbin/rbx gem install nokogiri
02:37:43evanand it went fine
02:38:13evantony_: try removing the nokogiri directory in gems/
02:38:25evanand install it again, maybe there is some weird old .o files or something
02:38:34tonyok
02:40:23tonymysql: /opt/rubinius/gems/1.8/gems/mysql-2.8.1/lib/mysql_api.so: undefined symbol: rb_gc
02:42:14evanack.
02:42:18evanwe're getting there!
02:42:26tony:D
02:42:50evanwhy the heck is mysql forcing the GC to run
02:42:57evani think i'll just stub out rb_gc()
02:43:05evanany use of that seems like an MRI hack.
02:43:33evanhm, we already have an rb_gc_start()
02:44:51tonyhate to digress, but reinstalled nokogiri from scratch on mri no prob, still fails on rbx with xml_sax_parser.o: could not read symbols: Bad value
02:45:10evanhm
02:45:11evanthats just doing
02:45:15evanbin/rbx gem install nokogiri
02:45:15evan?
02:45:19tonyyep
02:45:22evanhm
02:45:23evanok
02:45:28evanpuzzling.
02:45:31evani'll have to try on linux
02:45:36evani think it's some link flags
02:45:39tonydon't know if it makes a difference, but i installed rubinius into /opt/rubinius
02:45:47evanshouldn't matter.
02:45:53tonyadded it to path so i am doing rbx gem install nokogiri
02:45:55tonyk
02:46:42evanah
02:46:43evansure
02:46:44evanthats fine.
02:48:24evankronos_vano: your patch for $~ is fine, but you need a spec for rpartition
02:48:28evankronos_vano: that it sets $~
02:49:06kronos_vanoAlready working on it
02:49:36kronos_vanoevan, I should create patch for rubyspec or rubinius?
02:49:46evaneither is fine
02:49:53evanit will get sync from one to the other
02:49:57kronos_vanook
02:50:19boyscoutStub out rb_gc() in C-API - 616c0a8 - Evan Phoenix
02:50:21evantony_: round 3!
02:50:27evanor 4
02:50:28evananyway.
02:50:30tonyon it
02:50:30evan:)
02:50:33tony:D
02:53:13boyscoutCI: Commit e8549a9 failed. http://github.com/evanphx/rubinius/commit/e8549a914c70ef583a5e3fad604744bf48c9cf58
02:53:21tonyat the risk of sounding stupid, installing gems takes almost three times more than with mri.. so i'm still waiting for mysql to reinstall
02:54:18tonymysql: /opt/rubinius/gems/1.8/gems/mysql-2.8.1/lib/mysql_api.so: undefined symbol: rb_str_freeze
02:54:42tonyoh man, you hate me by now
02:56:15evannah!
02:56:17evanthis is fun!
02:56:30tony:D
02:56:32evanwe're just doing a funny run/test cycle
02:56:34evanok, let me do that one.
02:56:42evanwe're on a roll
02:56:44tonysure thing, thanks man!
02:56:44evanwhy stop now!
02:57:28tony10pm in mich, nowhere to go :D
02:57:35evan:D
02:57:44kronos_vanoevan, http://gist.github.com/295450 is it ok?
02:58:16evanyeah!
02:58:21evanthough, is that affects or effects
02:58:26evanI can never remember.
02:58:40kronos_vanohm
02:58:40tonyaffects :D
02:58:53kronos_vanook I'll bundle all it stuff in one patch
02:58:55evanthanks tony_!
02:58:58evankronos_vano: cool.
02:59:11tonynp :D
03:00:23kronos_vanoevan, updated
03:01:08evankronos_vano: do you have commit rights to rubinius?
03:01:12evani thought you did
03:01:14kronos_vanono
03:04:43evanwe should fix that!
03:05:32evanwould you like it now so you can commit your last patch? or should I commit your patch and you can commit your own from now on
03:05:34evan?
03:07:08kronos_vanonp, I can do it myself.
03:10:10evanok
03:10:17evanwhats your github name?
03:10:21kronos_vanokronos
03:10:36evank
03:11:02evanok, you're added
03:11:06evango ahead and commit!
03:11:20kronos_vanocoooooooooooooooool
03:11:22kronos_vanoYAHOOOOOO
03:11:27evan:)
03:11:40tonylol congrats kronos_vano
03:11:54evankronos_vano: be good!
03:12:04kronos_vanoevan, of cource!
03:12:14kronos_vano*course
03:13:47kronos_vanoevan, What about spec? Should i change it or not in rubinius repo
03:13:55evanah
03:13:58evani'm glad you asked
03:13:58evanso
03:14:07evanyou can commit them in rubinius only
03:14:07evanBUT
03:14:23evanyou must always commit to spec/ruby standalone
03:14:24evanmeaning
03:14:33evanif a commit touches spec/ruby, it must only touch spec/ruby
03:14:44evandon't mix implementation and spec
03:14:47kronos_vanoOk, I got it
03:15:04evanthat allows brixen to sync them easily.
03:15:15kronos_vanoso my patch is wrong. I should split it in two commits!
03:15:53evanyep
03:16:03evani should have told you earlier
03:16:04evanmy mistake.
03:16:11kronos_vanonp
03:21:50evantony_: almost done with freeze
03:22:08tonyevan, ok
03:27:50boyscoutImplement rb_obj_freeze and rb_str_freeze in C-API - 3411175 - Evan Phoenix
03:27:51evantony_: round 5...
03:27:52evanGO!
03:29:49tonyevan, lol, almost there
03:33:22tonyi'm definitely a party breaker: http://pastie.org/810525 -- rbx gem install mysql fails now
03:34:21tonyi went ahead and rm -r'd mysql gem directory so can't confirm if rbx script/server got any better
03:35:07evantony_: hrm.
03:35:08evanone sec
03:35:09evani'll fix!
03:35:42tonyok take your time, no worries
03:35:57evanoops!
03:35:59evanit's easy.
03:38:39tonyyeah, rb_str_set_len and rb_thread_start_timer are missing
03:38:50slavaevan my main man
03:39:09evantony_: eh?
03:39:45tonyevan, checking for rb_str_set_len()... no; checking for rb_thread_start_timer()... no
03:40:03tonycame from the output of rbx gem install mysql
03:40:07slavaevan: can fibers migrate between native threads?
03:40:16evantony_: yeah, i think we can ignore that for now.
03:40:19evanslava: not yet
03:40:23evanbut i know how to allow that.
03:40:31tonyevan, ok
03:40:31evani'm going to do that soon.
03:42:40boyscoutFix rb_str_freeze to return the object passed in - b1673f3 - Evan Phoenix
03:42:58tonyon it
03:44:36boyscoutCI: Commit 3411175 failed. http://github.com/evanphx/rubinius/commit/34111751b9afc0f314506a875662577a5ef23ac9
03:45:32evanoh uho.
03:46:38tonyevan, b1673f3 fixed mysql gem installation prob, new one on rbx script/server: /opt/rubinius/gems/1.8/gems/mysql-2.8.1/lib/mysql_api.so: undefined symbol: ULL2NUM
03:46:43evank
03:46:45evanon it!
03:46:54tony:D
03:49:30boyscoutRepair $~ variable - fe80773 - Ivan Samsonov
03:55:26boyscoutAdd spec for checking that rpartition affects $~ - c9765e5 - Ivan Samsonov
03:56:45boyscoutAdd ULL2NUM alias for rb_ull2inum - e06c8c8 - Evan Phoenix
03:56:45boyscoutImprove range check for rb_big2ll - 5c513d9 - Evan Phoenix
03:56:55evantony_: ok, give that a shot.
03:57:56tonyon it
04:01:30tonyevan, it crashes now with a Segmentation fault
04:01:37tonyno other errors
04:01:41evank
04:01:49evani'm going to do this on my linux machine now
04:01:55tonyok
04:01:57evansince debugging a segfault over IRC is less than fun.
04:02:11tonylol, k. thanks!
04:07:00boyscoutCI: Commit fe80773 failed. http://github.com/evanphx/rubinius/commit/fe80773ea8a0f4dc4d647eccff5758092d27d066
04:28:37evantony_: hm, i got the mysql tests to run...
04:28:59evantony_: so i'll need you to run under gdb and get me a backtrace
04:30:27tonyok, can you tell me what to run :D
04:36:33evangdb --args rbx <command to run rails>
04:36:44evanthen run
04:36:48evanit should run and when it crashes
04:36:49evando
04:36:52evanbt 100
04:36:54evanto get a backtrace
04:40:25tonyevan, ok this is what bt 100 gives me http://pastie.org/810593
04:40:48evanah! cool!
04:40:51evanit's not in mysql at all.
04:40:57evana NEW bug!
04:41:05tony:D
04:41:09evanok type
04:41:10evanframe 3
04:41:16evanp call_farme->print_backtrace(state)
04:41:26evanyour terminal should print out a ruby style backtrace
04:41:29tonythanks for getting me up to speed with gdb, i'm totally unfamiliar :D
04:41:32evanwhich you can paste me
04:41:35evantony_: no prob.
04:42:35tony(gdb) p call_farme->print_backtrace(state)
04:42:35tonyNo symbol "call_farme" in current context.
04:43:05evanframe
04:43:10evannot farme
04:43:10evansorry
04:43:12evancall_frame
04:43:50tonyhttp://pastie.org/810594
04:43:58tonynp
04:44:27evandamn.
04:44:29evanok
04:46:30evanok, lets do this
04:46:44evantouch vm/builtin/regexp.cpp
04:46:47tonyframe 3 output: #3 0x000000000055d1b2 in jit_stub_regexp_search_region (state=0x42bd6c0, call_frame=0x7fffec7a6a68, recv=<value optimized out>,
04:46:47tony ra0=0x7fffee3d6a58, ra1=0x10, ra2=0x7fffee3d6880, ra3=0x2) at vm/gen/primitives_glue.gen.cpp:18649
04:46:47tony18649 ret = self->match_region(state, a0, a1, a2, a3);
04:46:48evanrake -q build DEV=1
04:47:00tonyok
04:47:05tonyrbx rake?
04:47:06evanyou can exit gdb
04:47:23evanyeah, rubinius's rake
04:47:29evanto recompiled part of rubinius
04:47:36tonyalright
04:47:41evanthen we'll run the gdb command again
04:47:46evanand get a new backtrace
04:53:58tonyok i tried it, it's the same output
05:01:15tonytried the whole thing again, just to make sure i didn't miss something, but i get the same output as in http://pastie.org/810594
05:01:20evanthe EXACT same?
05:01:28evani need the backtrace
05:01:32evanit's probably not exactly the same
05:01:32tonyyes
05:01:35evanbut looks similar
05:01:46tonylet's see, i'll repaste
05:03:16tonythis is the whole thing: http://pastie.org/810604
05:03:56evanno no no
05:04:06evanyou've missed the most important part
05:04:09evando
05:04:10evanframe 0
05:04:12evanbt 10
05:04:17evanand pastie me that output
05:05:06tonyoops, sorry bout that, here it is: http://pastie.org/810607
05:06:07tonyIt ends where it says More stacks follow
05:06:09evanand you ran the touch and the rake line before doing this?
05:06:26evanthe touch is important
05:06:29tonyyes, touch, rake, installed the gem again, gdb'd script/server
05:06:31evanas is the DEV=1 on the end of rake
05:06:41evanhm
05:06:41tonyyes
05:06:41evanok
05:06:55evanfor run
05:06:57evanlets do this
05:07:03tonyok
05:07:05evangdb --args bin/rbx -Xint script/server
05:08:12tonyok i did it, and typed run
05:08:28tonyProgram received signal SIGTRAP, Trace/breakpoint trap.
05:08:28tony0x0000000000000000 in ?? ()
05:09:22evancan you get a backtrace?
05:09:27evanbt 10
05:10:03tonyhttp://pastie.org/810612
05:10:25evanwhat the fuck.
05:10:26evanhm.
05:10:39evando
05:10:40evanbt 30
05:11:21tonyhttp://pastie.org/810615
05:13:07evanhrm
05:13:20evanwell, i'm not sure what to tell ya
05:13:29evanis the rails app your running a private one?
05:13:39tonyi see
05:13:46tonyit's just a test app
05:13:56tonyi.e. empty
05:14:11evanhow do you have it configured?
05:14:16evanI know sqlite3 is the default
05:14:26tonyrails -d mysql testapp
05:14:29evanif you want, tar up the app
05:14:34evanah ok.
05:14:39evanlet me do some poking
05:15:01tonyalrighty, if you're tired, we can leave for some other time
05:15:20tonyleave it*
05:20:54tonyevan, i gotta go, i'll try it on arch linux over the weekend to see if it's specific to my ubuntu install or something, maybe it's not worth fixing it further now that those methods were added
05:21:05tonythanks for help!
05:21:15evanhey, i should be thanking you!
05:21:16evan:)
05:22:16tonyyou're very welcome! keep up the good work! you inspired me to contribute once i get to know the codebase better and gdb obviously :)
05:22:35tonygood night!
06:17:55rueThat was a reasonably fast debug cycle.
07:50:02dbussinkevan: ping?
07:50:14evansup
07:50:17evanjust headed to bed
07:50:43scooprwoo, clang is self-hosting!
07:51:32evani saw! pretty awesome.
07:52:00slavayeah
07:54:06evandbussink: yes?
07:54:16dbussinkevan: about http://github.com/evanphx/rubinius/commit/d94820f9de66a5f236dc03198b724e3a8b1a1cc8
07:54:26dbussinkevan: doesn't that return a null pointer into ruby space?
07:54:33evanyep
07:54:39evanthats how we unwind exceptions
07:54:47dbussinkah ok, that explains
07:54:51evanNULL is a sentinal value
07:55:01evanthat is checked for to see if an unwind is happening
07:55:03slavayo evan
07:55:12evanrather than depending on dwarf or setjmp/longjmp, etc.
07:55:24evanwe use a very simple, very portable, and pretty darn fast way.
07:55:29dbussinkevan: ah ok, makes sense then yeah
07:55:57evanhey! look at that
07:56:06evana sample rails app using mysql
07:56:12evanand it's working
07:56:31dbussinki actually had a sqlite3 one running too
07:56:33evanjust have to figure out why tony_'s was failing
07:56:48evanyeah, this is after tony_ and I sprinted on getting the mysql gem working
07:56:53evanit is now working
07:56:53evan:)
07:56:59dbussinkcool :)
11:47:00mahargevan: looks like the issue with mongrel and 4000 requests is fixed. Maybe it was one of the capi changes? I don't see anything specifically addressing it.
12:09:42dbussinkmaharg: accepting a socket was using ffi previously, which isn't interruptable from ruby
12:09:55dbussinknow it uses a primitive, which probably fixes the issue
12:12:01dbussinkmaharg: i'll close the ticket, you can file a new one if something similar comes up again then
12:12:36dbussinkmaharg: http://github.com/evanphx/rubinius/commit/b412c1b1c22a727f34cbaa651e4044de9c8af997
12:13:46slavaaww, evan is moving IO into the VM
12:14:20dbussinkslava: well, the other solution is to try to fix ffi so it's interruptable
12:14:37slavawhat do you mean yb being interruptible?
12:14:43dbussinkslava: he probably has some clever trick for it, but this was easier i think
12:15:12dbussinkslava: well, problem was that for example raising an exception in a thread should interrupt a socket#accept
12:15:25dbussinkbut that wasn't happening, since it was just waiting in the ffi call
12:28:14slavaso thread A can interrupt thread B's call to accept?
12:28:52slavais accept called on a non-blocking fd?
12:45:50dbussinkslava: well, looks like evan solved it now by releasing the gil, which was probably the biggest issue then
16:55:10evanslava: the fd was blocking
17:01:45rueBlocking IO should have a theme song
17:30:39evanrue: maybe we could redo the charlie's angels theme song for blocking io
21:40:31mahargevan, dbussink: ah, this one? http://github.com/evanphx/rubinius/commit/b412c1b1c22a727f34cbaa651e4044de9c8af997
21:40:42evanmaharg: yep.
21:43:06mahargit's pretty cool to see the JITer work its magic as you ab thousands of requests at a mongrel server
21:44:25evanyeah!
21:44:40evanall the request handling should heat right up
21:44:47evanmaharg: hows it performing?
21:45:43mahargwith the framework code I'm working on, it seems to peak at around half the requests per second as MRI
21:46:40evanok
21:46:52evanI suspect a lot of that is that we haven't done much optimizing of IO
21:47:02mahargyeah, I expect that's the case
21:47:22maharggiven what the other, more computationally focused, benchmarks show
21:47:43evanyeah
21:48:05evanmaharg: if you get a chance
21:48:07evando a run with
21:48:11evan-Xint -P
21:48:26evanso we can get some profiling info out of it.
21:48:38evan-Xint because I still haven't fixed the JIT profiler
21:49:56brixenmaharg: would be interesting to know the diff between runs with -Xint and without
21:50:05evanyeah
21:50:06brixenie, how much the jit is helping
21:53:38mahargthat a build option or an rbx flag?
21:54:40evanno
21:54:43evanbin/rbx -Xint ...
21:59:33maharghuh
21:59:36maharg-P is pretty sweet
22:00:17mahargso, MRI gets about 800rps, rbx no flags gets about 400, rbx -Xint -P gets about 91
22:00:26brixenwowsers
22:00:31brixengoooo jit
22:00:50evanmaharg: oh
22:00:52evantry -Xint
22:00:53evanno -P
22:00:55brixenmaharg: what about -Xint
22:00:57brixenheh, yeah
22:00:58evanthe -P adds a lot.
22:01:12brixenwell, -P shouldn't add terribly much
22:01:22brixenat least it didn't used to
22:01:29mahargwithout -P it gets about 250
22:01:34evanok
22:01:38brixenhm, more than I thought
22:01:40evanstill, JIT is making a nice dent.
22:01:46brixenyeah
22:02:01evanbrixen: he's hammering it, so building the profiler tree takes time
22:02:09brixenahh ok, sure
22:02:18brixenmaharg: can you gist the -P output?
22:02:21maharghttp://gist.github.com/296316
22:02:25mahargwas already on it
22:02:27brixenheh
22:02:49brixenwow, #fill
22:03:03evanexactly.
22:03:24evanit's IO.
22:04:04mahargyeah that's pretty brutal, 45 calls dominating 81% of execution time.
22:04:13evansomething about that feels off.
22:04:27evanbecause you did how many requests?
22:04:29maharggod, textpad's search is so painful
22:04:38mahargthat would have been somewhere around 5-10k
22:04:43mahargit does seem very off
22:04:52evani'd expect at least that many fills then.
22:05:15evanwould you mind making your mechanism for benchmarking this available?
22:05:21evani'd love to play around with it
22:05:56brixenman, 58 F and sunny here
22:06:06brixendid I fall asleep and wake up in june?
22:06:37evanthe rain just moved down to here
22:06:46brixenbummer heh
22:08:18evannah
22:08:22evanwe need all the rain we can get.
22:08:26evanthe more the better.
22:09:35mahargit's just the server being hammered with apache bench (ab). Can't release the code for the server just yet, though.
22:10:28evanmaharg: np.
22:10:40evanit's mongrel serving up some site then?
22:10:49evanI can do a generic mongrel benchmark
22:11:09evansince we think it's IO, thats probably good no matter what.
22:12:15mahargyeah, it's working two things: my framework's path dispatching and IO, and I think it does pretty well on the dispatching. I could actually whip up a benchmark to test that theory, but it seems pretty obvious to me
22:15:32evanok
22:49:31evanevery usage of rb_gc_start in an extension should come with a wrist slap
22:51:39brixenmongrel use that?
22:51:52evanno, but it's a few places
22:52:00evanand the mysql extension runs rb_gc() IN A LOOP
22:52:04evanON EVERY ROW
22:52:07brixenomg
22:52:08brixenwow
22:52:10evanyeah.
22:52:13evanexactly.
22:52:22brixenman
22:52:29brixenhow do you even describe that?
22:52:40brixenwhat were they thinking doesn't really cut it
22:52:41brixenheh
22:52:41evanoh, i'm wrong
22:52:45evanit's for every result
22:52:50evanbut it's not a loop
22:52:50brixenok
22:52:55evanand there is their own guard for some reason
22:53:01evanthey run the GC every X results
22:53:04evanX is ...
22:53:12evanUG
22:53:13evan20
22:53:27evanevery 20 queries it runs the GC.
22:53:33evanso it's not per row of the result
22:53:34evanbut still!
22:53:37brixenyeah
22:53:48evanthats ridiculous
22:54:00evanthats why I made our rb_gc() just an empty function.
22:54:23mahargI think it's because it was rather spammy with the ruby objects which degraded performance a lot and the maintainer changed and that was the 'easiest' solution. Ie. it was creating so many objects that performance was better when it was running the GC all the time
22:54:28brixendoes the jit turn it into nothing?
22:54:54evanbrixen: the JIT doesn't run on the C extensions...
22:54:57brixenyeah, I wondered if it was an MRI perf hack
22:55:09brixenevan: ah of course
22:55:20evanbut anyway
22:55:23mahargI seem to recall seeing discussion about it as it was happening, and it really did perform very badly
22:55:24evanyes, an MRI hack entirely.
22:56:02brixenevan: if we got clang working for compiling ext code, seems we could see that :)
22:56:31evandude
22:56:34evani've thought about it
22:56:43maharghttp://railsexpress.de/blog/articles/2006/10/05/make-ruby-mysql-create-less-garbage/
22:56:44brixenyou saw the clang announce?
22:56:44evani think that post 1.0
22:56:46evani'll do that.
22:56:47evanyeah
22:56:50brixencool
22:56:51evanpost 1.0
22:56:57evani wanna have clang embedded in
22:57:02evanand be able to JIT C extensions
22:57:04evanso you can do
22:57:08evanrequire "mysql.c"
22:57:20brixenpure evil
22:57:29scoopr"rubyinline"
22:57:38evanI can also then clean up the extension code!
22:57:43evanto make handles cheaper
22:57:55evanby transforming clang's trees
22:58:21brixenonly create handles if the pointer escapes?
22:58:27evanright
22:58:32brixenawesome
22:58:49evanand fixup an object pointers on the C stack
22:59:00brixenah yes
22:59:05evanso they're accessed via a GC viewable structure
23:20:11mahargso running just the request processing, it actually still shows pretty similar characteristics without network IO (though it's still filling a StringIO object for every req). 3132r/s with MRI, 5462r/s rubinius if I give it 20k requests to warm up (fairly linear improvements up to that point using more requests for warmup, starting at about 1256r/s with 1k warmup requests), and 1165r/s with no -Xint
23:20:33maharger wait
23:20:48mahargrbx with 20k should be 1830r/s
23:21:03maharg20k warmup and jit running
23:21:10maharg5462 was total running time
23:21:38evaner
23:21:40evannow i'm confused
23:21:47evansay the numbers again in full :)
23:21:55maharg3132req/s MRI
23:22:17maharg1830req/s rbx with 20k requests warmup before actually benchmarking
23:22:29maharg1165req/s rbx -Xint
23:23:02evanwhat was the 5462?
23:23:20mahargtotal ms for the run after warmup
23:23:36mahargthere are a lot of numbers on my screen right now heh
23:23:48evan:D
23:23:48evanok
23:26:23evanso still about 50%
23:26:53mahargThis is the -P for this benchmark: http://gist.github.com/296381
23:27:11evanyou ran -P with -Xint
23:27:13evanright?
23:27:21mahargyep
23:27:23evank
23:27:53mahargthe === are probably from hash lookups, there's a fair amount of that in the dispatching
23:27:54evana LOT of Dir.glob stuff
23:28:06evanare you doing a lot of Dir[] ?
23:28:06mahargyeah that's all well before the benchmark though
23:28:12evanwell
23:28:15evanit shouldn't show up then :)
23:28:29evanhm.
23:28:31mahargheh, it's still in the same process and run of the script
23:28:44mahargcan I turn on the profiler only for a segment of code?
23:28:52brixenyeah, you can
23:29:08brixenpeek in kernel/delta/profiler.rb
23:29:27brixenpr = Rubinius::Profiler::Instrumenter.new
23:29:33brixenpr.profile { # do some work here }
23:30:58evanHI BEN
23:32:02boyscoutRemove errant NULL check - 588c6a3 - Evan Phoenix
23:32:03boyscoutRefactor code out of rubinius::VM - 9b196bb - Evan Phoenix
23:32:03boyscoutRemove Globals& from VM - d6416f8 - Evan Phoenix
23:32:03boyscoutRemove VM::mailbox_ - 92db01f - Evan Phoenix
23:32:06benschwarzHI EVAN
23:32:09evanthat was a nice friday refactoring
23:32:28benschwarzYou good evan?
23:32:51evanyeah, good, good.
23:32:54evanyou?
23:33:26benschwarzI'm good. Waiting to go for eggs after sharing a lot of sake with mr egan
23:33:44evana sake saturday?
23:33:57benschwarzFriday night, saturday morning now
23:34:31maharghttp://gist.github.com/296389
23:35:05evanwtf
23:35:14evanwhy is there 140k calls to Rubinius::VM.reset_method_cache
23:35:26evanare you redefining a method on every request?
23:35:50mahargshouldn't be, no
23:36:05evanso, run with
23:36:10evan-Xint -Xprofiler.graph -P
23:36:19evanyou'll get a call graph profile output
23:36:25evanfind reset_method_cache in the output
23:36:38evanand paste the entry for it
23:36:46evanit should show the callers
23:41:01boyscoutCI: rubinius: 92db01f successful: 3041 files, 11848 examples, 36134 expectations, 0 failures, 0 errors
23:46:37rueThe question is whether rb_gc() was used...but whether it worked :D
23:47:43evanthe question is NOT whether, you mean?
23:48:04rueTo whether, or not to whether! :/
23:48:06rueYes
23:51:43mahargah I see what it is
23:52:03mahargI'm doing an extend on the IO object I'm outputing to
23:52:39evanah.
23:52:42evanthats bad news.
23:53:12evanthats got ugly cache implications
23:54:24rueHeh, xxx
23:54:40ruemaharg: Not #includeable?
23:55:10mahargit probably makes more sense for it to encapsulate rather than extend anyways
23:55:16evanwe can make it faster anyway, but yeah, extending an object per request blows up the cache a lot.
23:56:07mahargthis is some code that goes back to my very earliest days with ruby like 4 years ago
23:57:17evan:)
23:58:54ruemaharg: Used to be cleverer? :)