Go Back   vb.org Archive > Community Discussions > Forum and Server Management
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-05-2008, 07:25 AM
marisconsul marisconsul is offline
 
Join Date: May 2008
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default vbulletin_datastore - serialized tables

Hi,

I am new to vBulletin so I am that familiar yet with the backend.
I am planning to have more than 1000 usergroups AND more than 1000 forums. That shouldn't be a problem so far. But I checked some of the tables vBulletin is using. One is vbulletin_datastore.
It seems that in this table two other tables are stored in a serialized way - vbulletin_usergroup and vbulletin_forum. In that case it is not possible to have e.g. 1000 usergoups or forums because the size of the row would be to great for MyISAM.

Am I correct? If so, how can I prevent this?

Thank you.

René
Reply With Quote
  #2  
Old 06-05-2008, 07:49 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

MyISAM can handle very large columns.

But creating 1000 usergroups and 1000 forums will very likely give you memory problems and i strongly advise against this.
Reply With Quote
  #3  
Old 06-05-2008, 03:08 PM
marisconsul marisconsul is offline
 
Join Date: May 2008
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

1.
Thank you for your fast reply. I am talking about MySQL and here MyISAM restricts the maximum row size to 65535 Bytes per row. 1000 entries are not much for a database. Hence is this an issue in vBulletin? If so, what would rise problems here?

2.
Why are the forum and usergroup table stored serialized in the table datastore? Is there a specific reason and can this be changed easily.

Thank you.
Reply With Quote
  #4  
Old 06-05-2008, 03:27 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The maximum row size does not really come into it - the datastore "data" column is defined as MEDIUMTEXT (a form of BLOB) and can be extremely large (about 16 million chars I believe). It only takes up between 9 and 12 bytes in a MyISAM row.

Its done in vb to cache the data, and the cache is used in many places, it cannot be changed easily.
Reply With Quote
  #5  
Old 06-05-2008, 04:32 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

1. In addition to the MEDIUMTEXT datatype, there is also a LONGTEXT which can hold up to 4Gb.

2. Usergroup, forum & permission data is serialised into the datastore where all the data can be read into memory from a single read. This is a "cache" to speed up the forums.

The problem is mostly the permission, read into memory for each pageload:
- Data for all forums (name, description, settings, etc..)
- Data for all usergroups
- Permissions for each usergroup / forum combination (this can get huge if you have 1000 forums with 1000 usergroups)

Your server will probably quickly run out of memory.
Reply With Quote
  #6  
Old 06-05-2008, 09:41 PM
orban orban is offline
 
Join Date: Jan 2005
Posts: 445
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If every user is just member of a handful of those usergroups just create a new field in the user table, and store directly the ids of the forums he has access to in that field. Then make some plugins to manually check for permission in those forums (showthread, reply, newthread...etc).
Reply With Quote
  #7  
Old 06-06-2008, 07:16 AM
marisconsul marisconsul is offline
 
Join Date: May 2008
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it possible to prevent vBulletin from storing the forum and usergroup information into the datastore table and read it dynamically from the database?
I really need to bypass this behaviour. Can you please tell me the where I can find the places in vBulletin to change this.


P.s.:
I was talking about MyISAM tables in MySQL. Except TEXT and BLOB (5-9 bytes only go toward the total row size because TEXT and BLOB types don't get stored in the row itself, just a pointer to them.) fields the maximum row size for MyISAM engine is 65535 bytes per row. See the following page:

http://dev.mysql.com/doc/refman/5.0/...uirements.html


Thank you.
Reply With Quote
  #8  
Old 06-06-2008, 08:52 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by marisconsul View Post
Is it possible to prevent vBulletin from storing the forum and usergroup information into the datastore table and read it dynamically from the database?
Short answer: No!

The only option for that wuld be to run vBulletin 2.x, something you don't want to get started with.
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 04:21 AM.


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.03875 seconds
  • Memory Usage 2,223KB
  • 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
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)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