Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-26-2009, 06:48 PM
Adult SEO's Avatar
Adult SEO Adult SEO is offline
 
Join Date: May 2006
Location: The Netherlands
Posts: 291
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Loading the vBulletin tables into MySQL MEMORY tables?

Does anyone have experience with loading the vBulletin tables into memory tables?

It seems this may speed up the forum 3000x in practice according to MySQL performance blog.

http://www.mysqlperformanceblog.com/...vs+bdb+vs+heap

The only thing you would need is a backup system (memory is erased on server restart) and enough ram for the tables.

I am able to configure a varchar field up to 21k chars for MEMORY tables in PHPMyAdmin, which should be enough for most forums I think.
Reply With Quote
  #2  
Old 03-26-2009, 06:52 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Only put stuff into memory if you are prepared to lose it. vb puts the session tables into memory but that's it.
Reply With Quote
  #3  
Old 03-26-2009, 07:35 PM
Adult SEO's Avatar
Adult SEO Adult SEO is offline
 
Join Date: May 2006
Location: The Netherlands
Posts: 291
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
Only put stuff into memory if you are prepared to lose it. vb puts the session tables into memory but that's it.
Well, looking at the potential benefit: a forum that runs 3000x faster in practice, a comprehensive failsafe for it may be worth the effort?

I think this problem can be overcome.

And think about the benefits. Everything can just work as it does now, it will just work 3000x faster and requires some extra code for the failsafe. And most servers remain up for months easily, so it's not that the tables would need to be repopulated every day or so.

And ram isn't very expensive anymore, you could easily install 32 gig extra ram for your tables for just about $1000 dollar (high quality ram).

The benefit: a forum that can run as normally (also with the regular MySQL slave server configuration) but 3000x as fast as when using InnoDB or MyISAM tables.

--------------- Added 26 Mar 2009 at 21:50 ---------------

Intel is getting a memory like disk on the market:

Intel? X25-E Extreme SATA Solid-State Drive

Sustained sequential read: up to 250 MB/s
Sustained sequential write: up to 170 MB/s

http://www.intel.com/design/flash/na...reme/index.htm

Compared to a 15k SCSI disk with a read speed of about 80MB/s it is very good!

However, it is still nothing compared to DDR3-1600 ram speed: 12800 MB/s (about 250 times as fast as a regular SCSI disk)
Reply With Quote
  #4  
Old 03-27-2009, 05:31 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Adult SEO View Post
a comprehensive failsafe for it may be worth the effort?
You're going to have to move data to and from that failsafe - which will be slower than the RAM, meaning you would still lose data.
Reply With Quote
  #5  
Old 03-27-2009, 06:02 AM
Adult SEO's Avatar
Adult SEO Adult SEO is offline
 
Join Date: May 2006
Location: The Netherlands
Posts: 291
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dismounted View Post
You're going to have to move data to and from that failsafe - which will be slower than the RAM, meaning you would still lose data.
Yes, but does it need often, or could it be once per year if the server remains running?

If so, the user could be provided with a temporary "Under maintainance" message while the tables are repopulated.
Reply With Quote
  #6  
Old 03-27-2009, 02:29 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Adult SEO View Post
Yes, but does it need often, or could it be once per year if the server remains running?
Do you never have your servers go down unexpectedly? I know I do for reasons that have nothing to do with my site or anything I've done. I've even had one go down because some guy in the server building did an oops! and disconnected us. I would rather have my servers optimized to run well and have the data stored on the drive than count on the servers never having any sort of problem.
Reply With Quote
  #7  
Old 03-27-2009, 05:03 PM
Adult SEO's Avatar
Adult SEO Adult SEO is offline
 
Join Date: May 2006
Location: The Netherlands
Posts: 291
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
Do you never have your servers go down unexpectedly? I know I do for reasons that have nothing to do with my site or anything I've done. I've even had one go down because some guy in the server building did an oops! and disconnected us. I would rather have my servers optimized to run well and have the data stored on the drive than count on the servers never having any sort of problem.
Well, that is what the failsafe would be for so you benefit from the same security for data as with disk storage and also the speed benefit of memory storage.

And 3000x more speed for a big forum can make a huge difference, let alone in savings on hardware when you would use 64 gig ram (2000 USD) instead of a few extra servers (20k USD or more).

How much time would it cost to repopulate the memory tables from disk? Even if it costs 10 minutes for very big forums, why not having the server show a temporary maintainance message during that time. (64 gig data from a disk with 100MB/s speed would take about 10 minutes to do it)

The speed benefit would be so huge during the time the server remains online, I doubt any super expensive hardware setup will be able to beat it easily.
Reply With Quote
  #8  
Old 03-29-2009, 06:24 AM
Adult SEO's Avatar
Adult SEO Adult SEO is offline
 
Join Date: May 2006
Location: The Netherlands
Posts: 291
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Also, IIRC, tables stored HEAP/MEMORY cannot have indexes - meaning you may even slow your forum down by doing it.
It seems to me that MEMORY tables can have indexes like InnoDB.
Reply With Quote
  #9  
Old 03-29-2009, 02:47 PM
acroplex acroplex is offline
 
Join Date: Mar 2009
Location: Orlando, FL
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Are there servers that use solid state drives? That might be your answer.
Reply With Quote
  #10  
Old 03-29-2009, 08:12 PM
Adult SEO's Avatar
Adult SEO Adult SEO is offline
 
Join Date: May 2006
Location: The Netherlands
Posts: 291
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by acroplex View Post
Are there servers that use solid state drives? That might be your answer.
Well, it will be a great improvement yes, however, MEMORY is still just about 12 times as fast.

12 x the fastest disk, for just 2k investment.

What would you need hardware wise to get this capacity with just those disks? raid 10 with 240 disks?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:04 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07538 seconds
  • Memory Usage 2,250KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (7)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete