vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=34)
-   -   Cache the datastore in the filesystem (https://vborg.vbsupport.ru/showthread.php?t=75032)

mark99 02-19-2005 07:20 AM

If somebody could help with the above post then I'd be most grateful, it's a good solution for easing DB load.

kall 02-19-2005 08:47 AM

Quote:

Originally Posted by Erwin
I got it working with my version of ushop - you basically need to add the ushop variables to datastore templates too.

Could you please share how you managed it? :)

Stadler 03-20-2005 05:30 PM

Quote:

Originally Posted by mark99
1) When do you actually need to run the 'rebuild' process? Judging by the data - only when you change an option in the admin CP or add/edit one of your forums/category names & options. Does it need to be rebuilt after every new post or is it just doing the more static data?

2) Can I remove the admincp/rebuild....php script from the server when not needing to be used or does something require it to be there?

3) If I need to take my forums offline to change the options, then (as per above) will this corrupt my database? I'm confused about how this can be prevented as admins always need to update options/add forums etc. now and then. Do you take it offline, run the rebuild, update the options, run the rebuild, put it online and then run the rebuild again? Am a little confused ;)

Do you have a single or multiple webservers, where your forum is running on? If your forum only runs on a single werserver, theres nothing to worry about.

PS: Sorry for the late reply. I've been busy with other projects recently.

Stadler 03-20-2005 05:37 PM

I have updated some files. I've only updated some of the documentation and no functionality so far, so you don't need to update anything. You'll only waste your time ;)

For people with PHP < 4.2.0 I've added a note, what they could do to get the hack running.

Erwin: Scott pointed me to the following: How about triggering rebuild_dscache.php on all your server with something, like
fopen('http://www01.example.com/path/to/rebuild_dscache.php?silent=1&key=SECRET');
?

PS: PHP 4.3.11RC1 and PHP 5.0.4RC1 are out: http://news.php.net/php.general/210866

Erwin 03-20-2005 08:48 PM

Quote:

Originally Posted by kall
Could you please share how you managed it? :)

editing init.php and adding the ushop datastore into the cache too. :)

nexialys 03-21-2005 10:38 AM

SUGG: drop the config_dstore.php file and add the $dscache_dir var in the config.php
PHP Code:

define('CACHE_DATASTORE_FILE'true);
define('DATASTORE_FILE_DIR''./includes/'); 

$dscache_dobackup and BACKUP_DATASTORE_FILE are useless for now... would need to set it somewhere or delete it!

also, for security, isn't it suggested to NOT chmod the includes dir ?!

Stadler 03-21-2005 01:33 PM

Quote:

Originally Posted by nexialys
$dscache_dobackup and BACKUP_DATASTORE_FILE are useless for now... would need to set it somewhere or delete it!

D'Oh, right. I removed the backups from the script but forgot to mention that, sry. I'll remove the redundant code.

However: I'm working on enabling rebuild_dscache.php for running as a shell script. You will then be able to specify a key, so the script will only run, if you call it with rebuild_dscache.php?k=sdiztgejklt for example.
Or with php rebuild_dscache.php -k sdiztgejklt on your favorite shell.

Another parameter would be ?silent=1 or -s to make the script silent, except error-messages.

Stadler 03-21-2005 03:00 PM

Ok, can anyone test the recent version?
It works fine on my test-system (commandline and through URI)

Changes:
0.8.3 Alpha:
  • Removed some relics of the old backup functionality
  • some changes to make it possible to run it at the commandline (see below)
  • Allow to specify a key in the config-file, so this script will only run if you specify the correct key (-k KEY on the commandline or ?key=KEY in the URL)
  • You can make the script silent by adding -s respectively ?silent=1

Acido 03-23-2005 11:57 AM

OK, now i have this hack installed.
But i cant see any datastore_cache_TIMESTAMP.php file in my includes dir (i'm usign defaults dirs of the hack).

How i can to know if this is working?

Stadler 03-23-2005 02:51 PM

Quote:

Originally Posted by Acido
OK, now i have this hack installed.
But i cant see any datastore_cache_TIMESTAMP.php file in my includes dir (i'm usign defaults dirs of the hack).

How i can to know if this is working?

These are relics of the old backup functionality and won't be created anymore. I've left the note about them for users who still have old backup files in their includes-dir (or whereever they are storing their datastore_cache.php.

You should take a look at datastore_cache.php. It should contain the expanded arrays of the usergroupcache or the forumcache for example.

The Realist 03-24-2005 11:32 AM

When I run the rebuild_dscache.php script I get this error:

Starting to rebuild the datastore cache ...

Copying datastore_cache.php.new to datastore_cache.php ...
Warning: copy(./includes/datastore_cache.php): failed to open stream: Permission denied in /home/xxxxxxxxxxxx/public_html/forums/admincp/rebuild_dscache.php on line 96

failed

Line 96 says: if (!copy(DATASTORE_FILE_DIR . 'datastore_cache.php.new', DATASTORE_FILE_DIR . 'datastore_cache.php'))

Any ideas?

nexialys 03-24-2005 06:33 PM

you simply forgot to chmod the file and add the datastore_cache.php.new to your directory... (so you did not followed the instruction completely.. ;) )

The Realist 03-24-2005 08:07 PM

I did chmod the file and added all the files as per instructions.

:ogre:

Quote:

Originally Posted by nexialys
you simply forgot to chmod the file and add the datastore_cache.php.new to your directory... (so you did not followed the instruction completely.. ;) )


Stadler 03-24-2005 10:03 PM

Quote:

Originally Posted by The Realist
I did chmod the file and added all the files as per instructions.

:ogre:

Maybe your webserver hasn't the permission to overwrite datastore_cache.php? If that file doesn't exist in your includes-dir, then you need to chmod the directory to 755, 775 or 777 depending on your setup (777, if you're in doubt). If datastore_cache.php exists, it should be enough to chmod it to 644, 664 or 666 depending on your setup Assuming that file doesn't need to be executable).

Trigunflame 03-25-2005 09:38 PM

This is prob one of the most "relevant" useful modifcations on vbulletin.org right now, can't believe I didn't get around to installing it until today.

Hope vbulletin fully implements this at a later date as stock code.

kall 03-27-2005 01:44 AM

Quote:

Originally Posted by Erwin
editing init.php and adding the ushop datastore into the cache too. :)

If you could maybe hold my hand and lead me through the process step by step please?

(I haven't the foggiest idea what you mean to do..)

weeno 04-24-2005 07:13 PM

Anyone have thoughts on the ongoing use of this in light of PHP 4.3.11 released.

I've upgraded to 4.3.11 but am keeping the hack installed... as it must still reduce the burden on the server to cache this.

arn

Stadler 04-24-2005 08:29 PM

I'm using it because the connection between the database and the webserver is a bottleneck.

People should see for their own, if this reduces network traffic and/or speeds up connections significantly or not. If it doesn't, its recommended to uninstall or disable this hack.

Stadler 08-25-2005 10:53 PM

Since I had no issues for a long time and since no further issues were reported I've bumped the Version number to 1.0 now. All files are unchanged from version 0.8.3 Alpha, so there no need to upgrade.

Could someone move this to the proper forum please?

Regards,
Christian Stadler

nowrap 01-14-2006 12:40 PM

danke stadler!
is working like a charme on our vB 3.0.7 board having a 4MB forumcache!
rendertimes dropped from 1.2s+ to 0.3s and keeping the load at bay.

running:
apache 2.0.54
php 4.4.1
eaccelerator 0.9.4

bogene2020 01-31-2006 10:52 PM

Stadler,
Look at this https://vborg.vbsupport.ru/showthread.php?t=100486

Ok I was trying to figure out how many forums/sub forums I can have before I start running into performance problems. from what I have come to understand after I get to about 1500 Forums I will start to experience problems because of all the stuff that loads . Will it be safe to say that a hack like this datastore hack will help improve performance when one has so many forums . Thanks

Stadler 02-01-2006 07:11 AM

Quote:

Originally Posted by bogene2020
Stadler,
Look at this https://vborg.vbsupport.ru/showthread.php?t=100486

Ok I was trying to figure out how many forums/sub forums I can have before I start running into performance problems. from what I have come to understand after I get to about 1500 Forums I will start to experience problems because of all the stuff that loads . Will it be safe to say that a hack like this datastore hack will help improve performance when one has so many forums . Thanks

If your webserver and your database are on the same server, that hack would slow down your forum because of the time needed to load, parse and compile the script in that file. Maybe it is faster in combination with a PHP-Accelerator, like eAccelerator (which is recommended on such a big forum as yours), but that should be marginally. In short: The hack is mostly useless, if webserver and database are on the same server.

If your webserver and your database are on different servers, this hack would reduce your network-traffic between both machines, thus speeding up your forum (in most cases).

However: I can't guarantee anything, because there are so many different setups. You have to see for yourself, if this hack helps you or not. Or you could possibly try vB 3.5, where this feature is built in and much more improved, than this hack (For example you can choose to store the data directly in the memory).

Regards,
Christian Stadler


All times are GMT. The time now is 02:43 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.01446 seconds
  • Memory Usage 1,794KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (22)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete