PDA

View Full Version : vBET and performance



vBET
20-12-09, 01:18
vBET have lot of optimizations. Thanks that you can provide your content in 53 languages very fast.

Of course translations are not made magically and some resources are necessary to provide those. We have users with really big forums which successfully run vBET without any performance impact notice (http://www.vbenterprisetranslator.com/forum/vbet-good-stories/84-vbet-has-great-performance.html).

Still in case if you want to use vBET in fastest possible way, below are some configuration hints for you. Please note that those describe the most optimal configurations for performance reasons - sometimes by cost of available features, so do not fallow it if you do not have performance issues.

Make sure you are using last version of vBET. We are constantly improving performance.
(Since 4.2.3) Turn on Use Full File Cache For Guests and make sure that it works (check does cache files are created - need to set appropriate file privileges)
(Since 4.2.3) Set higher values for Full File Cache For Guests Time To Live and also for Full File Cache For Guests Time To Live For Les Relevant Pages
(Since 4.2.3) Consider which pages can be hold longer in full file cache for guests and add those to Less Relevant Pages For Full File Cache For Guests
vBET supports all encodings, but it is best if your forum uses utf-8 encoding, otherwise for each translation vBET have to re-encode whole page and do other additional tricks (also special characters takes much more place in DB cause those are changed to &#CODE; notation). If you are already running forum, there is no easy way to switch encoding (still it exists), but if you are creating new one then please consider to run it on utf-8 encoding which is designed to multilingual support.
You can disable some translations at the begging - when cache will be filled you can add new ones from time to time. Starting with all 52 translations means 52 times more content for users and roots. Some forums can easily handle this, for some it is better to start with few translations.
Make sure you have cache on.
For later it will be important for you to have appropriate Cache TTL. Bigger is better, but not more that 15 days to be fair with Google TOS
Choose best cache clearing strategy for your forum. For most forums 'Normal deletion' is best clearing strategy, but if you have really lot of translated content then normal cache deletion can kill your server. But be calm - we have special solutions for that cases. So you can choose 3 other strategies. Last one is fastest, but removes all cache content, so use it only if you have to.
(Since 4.3.0) Use Memory Cache. If you have your server configured to use Memory Cache, just go to admincp->vBET cache->Memory cache and choose the best option for you from Use memory cache. IMPORTANT: to use Memcache you need to put memcache host port!
Use "Cache clearing timelap" - vBET clears over 150 cache tables removing lot of data. You can order vBET to wait between each table. Whole task will take same amount of resources, but your server will "rest" between clearings so server load will be smaller.
Use option "Select grouped translations" according to your needs - this will make less queries to database so it will cost you less CPU, but by cost of more usage of RAM memory.
Do not set "Stop looking after x failures" to low or too high. This option optimizes cache usage. Thanks that vBET will stop trying to find in cache translations which are not there. If you set it too high vBET will try more times. If you set it too low vBET can stop looking translations which are really in cache only because some small changes happen on translated page.
Enable cache for all translations. vBET allows you to disable cache for chosen translations if you do not have too much space on disc, but such translations will take longer, since Google will be asked each time for those.
Set "Google Language Detection" to "Always trust user". vBET have great feature which allows to detect real language of message in case if user mess up something. But it have its cost - additional ask to Google have to be made when new post arrives.
Disable "Translate Google Maps". It allows you to translate Google maps included in your forum, but if you do not support those then disable it - it cost additional search and replace for links to Google map in whole output.
Experiment with option "Don't translate usernames". It causes less asking for translation, by cost of many additional checks in many forum places. So there is something for something - check which is better in your case.
Disable "Translate vBSEO messages in JavaScript" if you are not using this vBSEO functionality or disable it also in vBSEO. Translating it costs additional output parsing.
Block robots for not relevant pages - like members pages, calendar and so on. Robots are able to visit every corner of your forum very fast - what can improve your CPU usage for first translations. Mostly forum doesn't need member pages be indexed, but still it will take your forum resources to translate those pages. So block robots for all not relevant pages in all translations. In next post you will find robots.txt example for that - this is part of robots.txt used by this forum (note that URL's are changed by vBSEO, and our forum uses subdirectory in URL).
Using "Show original text" in booth versions - for users and guests. This options allows you to choose how you want to show original message. Showing it costs a little - it is not significant, but if you already done everything and seek for some little improvement then you can find it here. First of all - you have 2 ways to show original text if you wan: by JavaScript injection and in normal way. Normal one is better for performance, but injected one is better for SEO (robots do not see it). So if you feel you want show original content for booth - users and guests - then it is best to show injected for guest and normal for users. Of course you can choose to not show original text - it will be worst for your users but little better for performance. And you have also one more option - best for performance and worst for users - you can choose do not show original text or even message that it was translated. This option is best for performance because it is not using templates at all, worst for users, because they will not see that message was written in different language.
Play with advanced performance parameters: 'HTML size: cutting point' and 'HTML size: start cutting'. Please note that PHP performance drastically goes down when working on really big strings. I suppose that in such case PHP just writes it to some temporary file and is working on file instead of in memory. Because of that we modified translation algorithm and really big outputs are cut in smaller pieces during translation. This modification influences only large pages and you can configure it by mentioned performance parameters.
Play with advanced performance parameter: 'Delay between translations'. On some forums if request to Google are send one by one immediately then responses comes from Google in longer times or even are blocked by forum server. DO NOT use it without any measurement of performance changes and do such only with cache off to see real impact.
(Since 4.2.1) If you are using vBSEO please make sure that it is appropriately integrated. We made great improvements in integration between vBET and vBSEO which gives you better performance (no double redirects). So just go to integration section in readme.html file from vBET package and check described vBSEO files does those have appropriate changes.
Set bigger Cache Lifespan for RSS channels (in vBulletin options). It defines how long once generated RSS XML will be valid. Another generation will be after this time. So bigger value means less actual data, but also better performance.
(Since 4.2.3) Do not use option Don't translate code html tag if you do not really need to. Most forums do not allow users to put html code in posts, so it is not needed for most forums. Please note that content of code bbcode will not be translated anyway.
(Since 4.2.3) Turn off option Translate 'alt' attributes. It has small impact on performance but still requires additional output parsing with regex and at least one more request to Google (if results are not cached). Because translated results are not risible in browsers (only when mouse cursor is over the image) it will have no impact on your users when turned off.
Turn off "Display Logged in Users?". You can find this option in your AdminCP -> Setting -> Options -> Forums Home Page Options -> Display Logged in Users? : No . This will reduce amount of translations by removing display of dynamicly changing "who's reading forum" value.
Vbuletin do not recomend, to use this option. NOTE: disabling this option will also remove "who is online"
Change .htaccess rules.
NOTE: only if you are NOT using links with 2-signs part i.e: yourforum.com/XY/ etc.
Now you can use short rules!
Everywhere where you find

(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)
You can replace it with

(..|zh-CN|zh-TW)
which will make your site work faster!
I.e. changing rules for user with intagrated vbseo:


RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)/$ vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/ [L,QSA]
RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)/(.*)?$ vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/$2 [L,QSA]

into these:


RewriteRule ^/?(..|zh-CN|zh-TW)/$ vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/ [L,QSA]
RewriteRule ^/?(..|zh-CN|zh-TW)/(.*)?$ vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/$2 [L,QSA]

NOTE: if your forum use subdirectory in URL, then change 2 first rules adding your forum directory with leading '/' just after redirected=. So i.e. if your forum is in forum directory then you will have redirected=/forum/index.php and redirected=/forum/$2

Since realases vBET 4.4.5 and vBET 3.5.2 you can find these rules into your download files:

do-not-upload\tools\redirecting-rules\short-redirecting-rules

(Since 4.5.2) Turn off option Don't translate numbers. You'll find this option in AdminCP -> vBET -> Translation Options. Has little effect on performance, but it still requires an additional parsing characters. Anyway it is not reccomended to turn if off, because it increases the cost of translation.

Do not display the current date and time. Display the date and time causes additional translations every minute and additional queries to the database even if the data is already in cache.
In order not to display the current date and time:
Go to AdminCP->Styles & Templates->Search in templates
Search:
$vbphrase[all_times_are_gmt_x_time_now_is_y]
Remove it from all the templates.
From now on, the current date and time will not be displayed.
Please note that other templates can display the time by other variables - in this case, you need to find the variable and remove/comment it.

Do not show any rotating text on page. Rotating text makes that vBET sends more text to be translated.
If you want to put on page rotating text put it in JavaScript (text in JavaScript is not translated) or in notranslate area (http://www.vbenterprisetranslator.com/forum/vbet4-general-discussions/3168-how-make-some-text-not-translated.html).
(Since 4.5.3) Turn off option Add alternate tag. Enabling this option increases overhead time to add the tags and sends more data to users. By default, this option is disabled.

vBET
18-01-10, 01:42
Below you have example of robots.txt blocking irrelevant pages. In attachment you will find whole robots.txt file used on our forum.

NOTE: blocking pages by robots.txt will remove those from index. This is expected, since we want to block irrelevant pages.

NOTE: you can use robots.txt file when you have SEO links without using vBSEO.

NOTE: you can use robots.txt file when you have no SEO links on your forum. More about that you can read here: http://www.vbenterprisetranslator.com/forum/vbet4-general-discussions/408-vbet-performance.html#post6924

Please note that our forum uses subdirectory 'forum' what is included in each blocking rule. Also we are blocking normal URLs and URLs generated by vBSEO. So use our file only as example and determine what you need to block and what you do not need (you will not need it all). Please note that after blocking those sites will start disappearing from index if they are already indexed.

Attached file will block normal and translated URLs for:
- /members/
- /member.php
- /ajax.php
- /attachment.php
- /calendar.php
- /converse.php
- /cron.php
- /editpost.php
- /global.php
- /image.php
- /inlinemod.php
- /joinrequests.php
- /login.php
- /memberlist.php
- /misc.php
- /moderator.php
- /newattachment.php
- /newreply.php
- /newthread.php
- /online.php
- /picture.php
- /poll.php
- /postings.php
- /printthread.php
- /private.php
- /profile.php
- /register.php
- /report.php
- /reputation.php
- /search.php
- /sendmessage.php
- /showgroups.php
- /subscription.php
- /threadrate.php
- /usercp.php
- /usernote.php
- /visitormessage.php
- /sendpm.php
- /faq.php
- /signaturepics/
- /modcp/
- /images/
- /install/
- /includes/
- /admincp/
- /attachments/
- /clientscript/
- /cpstyles/
- /customavatars/
- /customprofilepics/

Example of robots.txt blocking irrelevant translated pages (and not translated too). This is part of our robots.txt file:


User-agent: *
sitemap: http://www.vbenterprisetranslator.com/forum/sitemap_index.xml.gz
Disallow: /forum/members/
Disallow: /forum/af/members/
Disallow: /forum/sq/members/
Disallow: /forum/ar/members/
Disallow: /forum/hy/members/
Disallow: /forum/az/members/
Disallow: /forum/eu/members/
Disallow: /forum/be/members/
Disallow: /forum/bg/members/
Disallow: /forum/ca/members/
Disallow: /forum/zh-CN/members/
Disallow: /forum/hr/members/
Disallow: /forum/cs/members/
Disallow: /forum/da/members/
Disallow: /forum/nl/members/
Disallow: /forum/en/members/
Disallow: /forum/et/members/
Disallow: /forum/tl/members/
Disallow: /forum/fi/members/
Disallow: /forum/fr/members/
Disallow: /forum/gl/members/
Disallow: /forum/ka/members/
Disallow: /forum/de/members/
Disallow: /forum/el/members/
Disallow: /forum/ht/members/
Disallow: /forum/iw/members/
Disallow: /forum/hi/members/
Disallow: /forum/hu/members/
Disallow: /forum/is/members/
Disallow: /forum/id/members/
Disallow: /forum/ga/members/
Disallow: /forum/it/members/
Disallow: /forum/ja/members/
Disallow: /forum/ko/members/
Disallow: /forum/lv/members/
Disallow: /forum/lt/members/
Disallow: /forum/mk/members/
Disallow: /forum/ms/members/
Disallow: /forum/mt/members/
Disallow: /forum/no/members/
Disallow: /forum/fa/members/
Disallow: /forum/pl/members/
Disallow: /forum/pt/members/
Disallow: /forum/ro/members/
Disallow: /forum/ru/members/
Disallow: /forum/sr/members/
Disallow: /forum/sk/members/
Disallow: /forum/sl/members/
Disallow: /forum/es/members/
Disallow: /forum/sw/members/
Disallow: /forum/sv/members/
Disallow: /forum/zh-TW/members/
Disallow: /forum/th/members/
Disallow: /forum/tr/members/
Disallow: /forum/uk/members/
Disallow: /forum/ur/members/
Disallow: /forum/vi/members/
Disallow: /forum/cy/members/
Disallow: /forum/yi/members/
Disallow: /forum/member.php
Disallow: /forum/af/member.php
Disallow: /forum/sq/member.php
Disallow: /forum/ar/member.php
Disallow: /forum/hy/member.php
Disallow: /forum/az/member.php
Disallow: /forum/eu/member.php
Disallow: /forum/be/member.php
Disallow: /forum/bg/member.php
Disallow: /forum/ca/member.php
Disallow: /forum/zh-CN/member.php
Disallow: /forum/hr/member.php
Disallow: /forum/cs/member.php
Disallow: /forum/da/member.php
Disallow: /forum/nl/member.php
Disallow: /forum/en/member.php
Disallow: /forum/et/member.php
Disallow: /forum/tl/member.php
Disallow: /forum/fi/member.php
Disallow: /forum/fr/member.php
Disallow: /forum/gl/member.php
Disallow: /forum/ka/member.php
Disallow: /forum/de/member.php
Disallow: /forum/el/member.php
Disallow: /forum/ht/member.php
Disallow: /forum/iw/member.php
Disallow: /forum/hi/member.php
Disallow: /forum/hu/member.php
Disallow: /forum/is/member.php
Disallow: /forum/id/member.php
Disallow: /forum/ga/member.php
Disallow: /forum/it/member.php
Disallow: /forum/ja/member.php
Disallow: /forum/ko/member.php
Disallow: /forum/lv/member.php
Disallow: /forum/lt/member.php
Disallow: /forum/mk/member.php
Disallow: /forum/ms/member.php
Disallow: /forum/mt/member.php
Disallow: /forum/no/member.php
Disallow: /forum/fa/member.php
Disallow: /forum/pl/member.php
Disallow: /forum/pt/member.php
Disallow: /forum/ro/member.php
Disallow: /forum/ru/member.php
Disallow: /forum/sr/member.php
Disallow: /forum/sk/member.php
Disallow: /forum/sl/member.php
Disallow: /forum/es/member.php
Disallow: /forum/sw/member.php
Disallow: /forum/sv/member.php
Disallow: /forum/zh-TW/member.php
Disallow: /forum/th/member.php
Disallow: /forum/tr/member.php
Disallow: /forum/uk/member.php
Disallow: /forum/ur/member.php
Disallow: /forum/vi/member.php
Disallow: /forum/cy/member.php
Disallow: /forum/yi/member.php

vBET
07-06-10, 20:36
Added new hints which will be appropriate since vBET 4.2.3:

(Since 4.2.3) Turn on Use Full File Cache For Guests and make sure that it works (check does cache files are created - need to set appropriate file privileges)
(Since 4.2.3) Set higher values for Full File Cache For Guests Time To Live and also for Full File Cache For Guests Time To Live For Les Relevant Pages
(Since 4.2.3) Consider which pages can be hold longer in full file cache for guests and add those to Less Relevant Pages For Full File Cache For Guests

vBET
15-06-10, 17:24
Added new performance hint for RSS generation:

Set bigger Cache Lifespan for RSS channels (in vBulletin options). It defines how long once generated RSS XML will be valid. Another generation will be after this time. So bigger value means less actual data, but also better performance.

vBET
20-06-10, 16:56
New performance hint added for new release:

(Since 4.2.3) Do not use option Don't translate code html tag if you do not really need to. Most forums do not allow users to put html code in posts, so it is not needed for most forums. Please note that content of code bbcode will not be translated anyway.

vBET
08-08-10, 06:44
New performance hint added for new release (vBET 4.2.3):

(Since 4.2.3) Turn off option Translate 'alt' attributes. It has small impact on performance but still requires additional output parsing with regex and at least one more request to Google (if results are not cached). Because translated results are not visible in browsers (only when mouse cursor is over the image) it will have no impact on your users when turned off.


Please note that by default this option will be turned off.

vBET
09-12-10, 20:07
Added updated robots.txt file - it includes codes for new languages which will be added soon.

kamilkurczak
24-01-11, 13:13
You can use robots.txt file when you have no SEO links on your forum
(links with ?language= parameter inside)

Example of url:

www.example.com/?language=pl

Example of robots.txt blocking irrelevant translated pages (and not translated too). This is our robots.txt file:

User-agent: *
sitemap: http://www.vbenterprisetranslator.com/forum/sitemap_index.xml.gz
Disallow: /forum/members/
Disallow: /forum/member.php
Disallow: /forum/externalredirect.php
Disallow: /forum/ajax.php
Disallow: /forum/attachment.php
Disallow: /forum/calendar.php
Disallow: /forum/converse.php
Disallow: /forum/cron.php
Disallow: /forum/editpost.php
Disallow: /forum/global.php
Disallow: /forum/image.php
Disallow: /forum/inlinemod.php
Disallow: /forum/joinrequests.php
Disallow: /forum/login.php
Disallow: /forum/memberlist.php
Disallow: /forum/misc.php
Disallow: /forum/moderator.php
Disallow: /forum/newattachment.php
Disallow: /forum/newreply.php
Disallow: /forum/newthread.php
Disallow: /forum/online.php
Disallow: /forum/picture.php
Disallow: /forum/poll.php
Disallow: /forum/postings.php
Disallow: /forum/printthread.php
Disallow: /forum/private.php
Disallow: /forum/profile.php
Disallow: /forum/register.php
Disallow: /forum/report.php
Disallow: /forum/reputation.php
Disallow: /forum/search.php
Disallow: /forum/sendmessage.php
Disallow: /forum/showgroups.php
Disallow: /forum/subscription.php
Disallow: /forum/threadrate.php
Disallow: /forum/usercp.php
Disallow: /forum/usernote.php
Disallow: /forum/visitormessage.php
Disallow: /forum/sendpm.php
Disallow: /forum/faq.php
Disallow: /forum/signaturepics/
Disallow: /forum/modcp/
Disallow: /forum/images/
Disallow: /forum/install/
Disallow: /forum/includes/
Disallow: /forum/admincp/
Disallow: /forum/attachments/
Disallow: /forum/clientscript/
Disallow: /forum/cpstyles/
Disallow: /forum/customavatars/
Disallow: /forum/customprofilepics/

r.dziadusz
23-09-11, 17:25
New performance hint!

Turn off "Display Logged in Users?". You can find this option in your AdminCP -> Setting -> Options -> Forums Home Page Options -> Display Logged in Users? : No.
This will reduce amount of translations by removing display of dynamicly changing "who's reading forum" value. Vbuletin do not recomend, to use this option.
NOTE: disabling this option will also remove "who is online"

r.dziadusz
29-10-11, 12:13
Change .htaccess rules.
NOTE: only if you are NOT using links with 2-signs part i.e: yourforum.com/XY/ etc.
Now you can use short rules!
Everywhere where you find

(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)
You can replace it with

(..|zh-CN|zh-TW)
which will make your site work faster!
I.e. changing rules for user with intagrated vbseo:


RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)/$ vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/ [L,QSA]
RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)/(.*)?$ vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/$2 [L,QSA]

into these:


RewriteRule ^/?(..|zh-CN|zh-TW)/$ vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/ [L,QSA]
RewriteRule ^/?(..|zh-CN|zh-TW)/(.*)?$ vbenterprisetranslator_seo.php?vbet_lang=$1&redirected=/$2 [L,QSA]

NOTE: if your forum use subdirectory in URL, then change 2 first rules adding your forum directory with leading '/' just after redirected=. So i.e. if your forum is in forum directory then you will have redirected=/forum/index.php and redirected=/forum/$2

Since realases vBET 4.4.5 and vBET 3.5.3 you can find these rules into your download files:

do-not-upload\tools\redirecting-rules\short-redirecting-rules

Marcin Kalak
02-10-12, 17:37
(Since 4.5.2) Turn off option Don't translate numbers. You'll find this option in AdminCP -> vBET -> Translation Options. Has little effect on performance, but it still requires an additional parsing characters. Anyway it is not reccomended to turn if off, because it increases the cost of translation.

Marcin Kalak
08-11-12, 22:19
Do not display the current date and time. Display the date and time causes additional translations every minute and additional queries to the database even if the data is already in cache.
In order not to display the current date and time:

Go to AdminCP->Styles & Templates->Search in templates
Search:
$vbphrase[all_times_are_gmt_x_time_now_is_y]
Remove it from all the templates.

From now on, the current date and time will not be displayed.


Please note that other templates can display the time by other variables - in this case, you need to find the variable and remove/comment it.

Marcin Kalak
19-02-13, 14:49
Do not show any rotating text on page. Rotating text makes that vBET sends more text to be translated.
If you want to put on page rotating text put it in JavaScript (text in JavaScript is not translated) or in notranslate area (http://www.vbenterprisetranslator.com/forum/vbet4-general-discussions/3168-how-make-some-text-not-translated.html).

Marcin Kalak
22-02-13, 15:05
(Since 4.5.3) Turn off option Add alternate tag. Enabling this option increases overhead time to add the tags and sends more data to users. By default, this option is disabled.

AfrikaansAlbanianArabicBelarusianBulgarianCatalanChineseCroatianCzechDanishDutchEnglishEstonianFilipinoFinnishFrenchGalicianGermanGreekHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKoreanLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishTaiwaneseThaiTurkishUkrainianVietnameseWelshYiddish
Translated to other languages supported by vB Enterprise Translator 4.9.99