Link zur Modifikation (https://custom.simplemachines.org/mods/index.php?mod=4155)
SMF-Benchmark (https://custom.simplemachines.org/mods/index.php?mod=4155)
This mod provide SMF 2.1 with the posibility to check the performance of the enviorment.
Benchmark type
- Create as many users as possible in one minute - cpu heavy test
- Create as many posts as possible in one minute - This test is db insert performance heavy
- Repeatedly access a topic for one minute - This test depends heavily on the size of your board and the active features
Use case
- Changing your php or database version
- Changing your database solution exp. MySQL -> MariaDB
- Changing smf settings exp. different Caching Methods or levels
- Changing your host
- Possible side effect from mods
- To check if your board get slower over time
This mod run on MySQL, MariaDB and PostgreSQL.
After install you find the entry under: Maintenance > Forum Maintenance > Benchmark
GitHub Link (https://github.com/albertlast/SMF-Benchmark)
All suggestions related to core features and UI are most welcomed.
License
* This SMF Modification is subject to the BSD 3
Nice idea would have to check it out.
Oh, how very interesting! Any chance of a 2.0.x version?
Since i don't use smf 2.0.x i had no plan to make this work for this.
I try to install my mod on smf 2.0.x but the displaying doesn't work...
Yeah, I figured it wouldn't, so I didn't even try it in the first place :) But thanks for letting us know at least!
Maybe for comparison, please hav in mind that is a synthetic benchmark.
smf 2.1 "beta4" pg 9.6 php 7.1 mariadb 10.1
PG is a mid size board
PG Cache lvl3 is a mid size board with pg as cache level 3
MySQL is near fresh
PG fresh is a fresh install
Test
| PG
| PG Cache lvl3
| MariaDB
| PG fresh
|
User Creation
| 111
| 113
| 88
| 865
|
Post Creation
| 5381
| 9087
| 75
| 8263
|
Post read
| 7371
| 12475
| 19080
| 17872
|
Because i created this table with benchmark i was interessted in smf 2.0 too.
So setup a clean version of MariaDB with two changes,
convert all tables to innodb and disable caching.
User Creation 316
Post Creation 82
Post read 9130
Since i did it, i know what is needed to run this mod on smf 2.0.x
Three steps (first two steps you find in attachment):
-Add in package-info.xml
<install for="2.0, 2.0.1-2.0.99">
<readme type="file" parsebbc="true">readme.txt</readme>
<require-dir name="Themes" destination="$boarddir">Theme files</require-dir>
<require-dir name="Sources/SMFBenchmark" destination="$sourcedir">Source files</require-dir>
<code>installer/installHooks2.1.php</code>
<redirect url="?action=admin;area=maintain;sa=benchmark" type="inline" timeout="2000">Please stand by while you are being redirected to benchmark side.</redirect>
</install>
<uninstall for="2.0, 2.0.1-2.0.99">
<code>installer/uninstall2.1.php</code>
<remove-dir name="$sourcedir/SMFBenchmark" />
<remove-file name="$themedir/SMFBenchmark.template.php" />
<remove-file name="$languagedir/SMFBenchmark.english.php" />
</uninstall>
- search Class-SMFBenchmark.php for (should be there three times)
if (!isset($_SESSION['optimized_tables']))
validateToken('admin-maint');
else
validateToken('admin-optimize', 'post', false);
and replace this with
/*
if (!isset($_SESSION['optimized_tables']))
validateToken('admin-maint');
else
validateToken('admin-optimize', 'post', false);
*/
- Last step >after< the install of the mod in your board
got to Sources/ManageMaintenance.php
to the end of $subActions array (in smf 2.0.14 this is line 178)
add after this:
//Bechmark
loadTemplate('SMFBenchmark');
$context[$context['admin_menu_name']]['tab_data']['tabs']['benchmark'] = array();
$subActions['benchmark'] = [
'function' => 'SMFBenchmark::MaintainBenchmark',
'template' => 'maintain_Benchmark',
'activities' => [
'usercreate' => 'SMFBenchmark::UserCreate',
'postcreate' => 'SMFBenchmark::PostCreate',
'postread' => 'SMFBenchmark::PostRead',
],
];
//end Bechmark
The first two steps i combined in the attachment already,
so you can install the mod and go to step three.
As always i recommand to redo the changes of step three and removed the mod asap,
when you done with testing.
help ,how can I install on fresh 2.0.14...getting error when tring to install :(
This mod doesn't work for any 2.0.xx versions. Just for SMF 2.1 Beta 3.
Changed the version to 1.2
Changelog:
Added Russia
Added Beta4 (github version) support
Place a check if db_show_debug is enabled - don't run the benchmark when you enabled this, when you did you need to restart you webserver after running
Too bad this mod is not planned for SMF 2.0.x ... :'(
You can use this but you need to do the steps which i posted here: https://www.simplemachines.org/community/index.php?topic=556205.msg3943565#msg3943565
So you propose a "patch" for an official SMF and a full mod for a beta version.
Okay.
Thank you goodbye !
To use this do I have to:
- Create as many users as possible in one minute - cpu heavy test
- Create as many posts as possible in one minute - This test is db insert performance heavy
- Repeatedly access a topic for one minute - This test depends heavily on the size of your board and the active features
???
Why you belief this?
This are different options which the benchmark can run.
OK, if I don't have to run that stuff than I will install this later today at some point.
This mod is for seeing how quickly different things work on your server and for testing different ways to do something. I don't think you want this in your production site.
If it's going to mess with stuff than no I don't.
No it don't mess up with any stuff,
but since it a benchmark it make no sense to keept it after you run your tests.
I have a test site. I will try it on there and see what happens.
I have installed it to my test site. I have a question though. I have a vps so creating all these users and posts may not be a good idea if it shuts down my server in some way. I don't know if it could do that but it was a thought that entered my head.
I don't understand you thought.
It's a benchmark and you can decide which test you run.
I understand what you are saying. I just worry about creating that many users and posts all at once on a small server.
But that's exactly the point, to see how fast the server can do it.
I know that's the point. Could it crash a server though. ??
Ok, it just created 110 users....forums still there, lol. Page created in 60.225 seconds with 608 queries.
3085 posts created Page created in 60.925 seconds with 34042 queries.
One topic accessed Page created in 60.101 seconds with 174801 queries.
Out of mild curiosity with caching off:-
Creating User:142
Creating Posts:26001
Reading Posts:80409