Eric Kidd wrote:
> On Mar 22, 2006, at 2:26 PM, Randy Kramer wrote:
>> 3 million updates per day doesn't mean much to me.  With a little 
>> arithmetic,
>> that looks like a sustained average load of ~ 33 TPS.
>
> By an interesting coincidence, Rails sites tend to support about 30 
> hits/second/server on decent hardware, assuming they have to go all 
> the way to the database and render views. With action caching (which 
> bypasses the database and view rendering, but still runs Ruby code), 
> I've seen benchmarks in the 500 hits/second range.
>
> So Ruby might very well be a plausible solution, depending on a number 
> of factors. Given the sweet simplicity of ActiveRecord, you could even 
> spend a couple of days building a prototype and seeing how fast it 
> goes. :-)
>
> Cheers,
> Eric
>
>
>
Simple test, ran from
   within RDE editor
   windows xp,
   testog=# select version();
                                         
version                                         
------------------------------------------------------------------------------------------
 PostgreSQL 8.1.3 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 
3.4.2 (mingw-special)
(1 row)
   with 119 odd processes running ( windows, cygwin, etc, etc)
   1GB ram

10000 inserts in < 60 seconds = 167 tps.

testog=# truncate ogcomment;
TRUNCATE TABLE
testog=# select * from ogcomment;
 title | body | author | create_time | oid
-------+------+--------+-------------+-----
(0 rows)

I, [2006-03-22T16:44:48.183000 #3220]  INFO -- : Og uses the Psql store.
Wed Mar 22 16:44:49 Eastern Standard Time 2006
Wed Mar 22 16:45:44 Eastern Standard Time 2006
D, [2006-03-22T16:44:49.464000 #3220] DEBUG -- : Table ogcomment already 
exists
D, [2006-03-22T16:44:49.495000 #3220] DEBUG -- : PostgreSQL processing 
foreign key constraints
D, [2006-03-22T16:44:49.495000 #3220] DEBUG -- : PostgreSQL finished 
setting constraints. No action was taken in 0.00 seconds.
Completed(0)



testog=# select count(*) from ogcomment;
 count
-------
 10000
(1 row)

testog=# select min(create_time),max(create_time) from ogcomment;
         min         |         max        
---------------------+---------------------
 2006-03-22 16:44:49 | 2006-03-22 16:45:44
(1 row)



require 'og'

class Comment
    property :title, String
    property :body, String
    property :author, String
    property :create_time, Time
end
og_psql = {
  :destroy => true,
  :store => :psql,
  :user => 'rthompso',
  :password => 'rthompso',
  :name => 'testog'
}

Og.setup(og_psql)

c = Comment.new
c.title = 'Hello'
c.body = 'World'
c.create_time = Time.now
c.author = 'tml'

puts Time.now
# save the object in the database
1.upto(10000)  { |i|
  c = Comment.new
  c.title = 'Hello'
  c.body = 'World'
  c.create_time = Time.now
  c.author = 'tml'
  c.save
}
puts Time.now