From: Matt Stancliff Date: Fri, 12 Oct 2007 16:03:41 -0400 To: erlang-questions X-Mailer: Apple Mail (2.752.3) X-ELNK-Trace: e66eeb45e26860a0d4c20f6b8d69d888a4beb055f130b31a9b6e38a692348a420ac250842d03093e350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 66.23.219.246 Subject: Re: [erlang-questions] Building edtk and bdb X-BeenThere: erlang-questions@erlang.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Erlang/OTP discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: erlang-questions-bounces@erlang.org Errors-To: erlang-questions-bounces@erlang.org On Oct 12, 2007, at 14:36, Chris Newcombe wrote: > Matt Stancliff sent me an 'installer' script a while back which does > the download and applies some patches to remove the absolute paths. There's a newer version of the edtk+bdb installer at http:// mattsmind.net/erlang/ The new version has nicer options and you can easily compile the bdb driver natively if you like. (If you haven't looked, edtk has five dependencies and my install script will download everything and built it for you.) Note -- edtk+bdb does not work under OS X. To get it working with OS X, gsl and sfl need to be modified (quick #define fixes) and then something else busts which I never got around to fixing. If you get edtk+bdb building under OS X, I would love to see your patches. With all the talk of BDB recently on the mailing list, I'd like to share some benchmarks I have. I have a generic BDB/Mnesia compatibility layer, but it's fairly slow compared to raw BDB or mnesia access: Tests for entire record DB reading/writing: Test 5.5.5 BEAM Per second (slowdown) mnesia_dirty_read 1.00 123055.2 (123k) mnesia_dirty_read_idx 4.04 30451.4 (30k) mnesia_read_idx 4.16 29570.7 (29k) mnesia_read 4.27 28836.8 (28k) mnesia_dirty_write 4.91 25060.5 (25k) mnesia_write 16.56 7431.8 (7k) mnesia_dirty_wrte_with_idx 17.03 7224.9 (7k) mnesia_write_with_idx 27.93 4405.6 (4k) bdb_record_read 91.3 1347.8 (1k) bdb_record_read_idx 124.36 989.5 (0.9k) bdb_record_write 156.15 788 (0.7k) bdb_record_write_idx 340.41 361.5 (0.3k) Tests for caching methods: Test 5.5.5 BEAM Per second (slowdown) ets_read 1.00 613379.3 (613k) mnesia_mem_read 1.61 380888.9 (380k) process_per_cache_item 9.09 67509.4 (67k) bdb_plain_read 25.09 24449.5 (24k) bdb_record_read 452.70 1354.9 (1k) My bdb_record functions act like mnesia functions. You can do: - bdb:write_record(#person{name = bob, age = 23}) - bdb:read(person, bob) => [#person{name = bob, age = 23}] Those functions involve a lot of term_to_binary and binary_to_term conversions. The bdb_plain_read test is raw BDB reading with a known binary key (no term conversions). Note: Even though my BDB record reading is 450x slower than reading from ets, I still get over 1300 read/s. Sincerely, -Matt -- Matt Stancliff sysop@mindspring.com AIM: seijimr iPhone: 678-591-9337 "The best way to predict the future is to invent it." --Alan Kay _______________________________________________ erlang-questions mailing list erlang-questions@erlang.org http://www.erlang.org/mailman/listinfo/erlang-questions