We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

How to make newsfeed's user with +700 friends faster | Forum

Topic location: Forum home » Support » General Questions
Simone
Simone Nov 13 '15
Hi!


I have a dedicated server with this configuration:

Opteron 8 cores

32GB ddr3

2x250GB SSD raid hd

Ubuntu 14

Plesk 12.5

Php 5.5.9 with Apache module served with Apache

Op_Cache on


When an user with 500+ friends try to load dashboard, it takes a lot of time to show page (10-15 seconds).


Is there any optimization?

I've tryed to install nginx but i can't able to make login with user...

I've also tryed to change php application to FPM server by Apache but I have the same issue.


What can I try to do?

Thank you


ross Team
ross Nov 13 '15
Jordi
Jordi Nov 15 '15
hi. 


i have mamcached and apc running with a appache nginx comboon a vps. page load with more then 400 friends is something like 2 seconds.

Simone
Simone Nov 15 '15
And dashboard newsfeed?
ross Team
ross Nov 15 '15
Does the configuration provided in this post by you helped you to speed up your server: http://www.oxwall.org/forum/topic/42811
Simone
Simone Nov 16 '15
hi ross, 

yes all site pages loads in 1 or 2 seconds except dashboard page that takes 10 seconds if you have more than 500 friends but other pages loads very faster

(even if you have 2000 friends). 


i think its a not optimized newsfeed plugin 


in my server i have a cpu load of 0.16 (very low)  and 28gb free ram. 


so its not a slow cpu power problem 

Jordi
Jordi Nov 16 '15
I have the dashboard newsfeed on my index page. 

load time with 400+ something like 2 seconds


Simone
Simone Nov 16 '15
site name?
Simone
Simone Nov 17 '15
Hi,

with ow_profile_enable true i see this mysql query that takes 9second to load


SELECT b.`id` FROM ( SELECT action.`id`, action.`entityId`, action.`entityType`, action.`pluginKey`, action.`data`, activity.timeStamp FROM ow_newsfeed_action action INNER JOIN ow_newsfeed_activity activity ON action.id = activity.actionId INNER JOIN `ow_newsfeed_action_set` cactivity ON action.id = cactivity.actionId INNER JOIN `ow_base_user` base_user_table_alias ON base_user_table_alias.`id` = `cactivity`.`userId` LEFT JOIN `ow_base_user_suspend` base_user_suspend_table_alias ON base_user_suspend_table_alias.`userId` = `base_user_table_alias`.`id` INNER JOIN ow_newsfeed_action_feed action_feed ON activity.id=action_feed.activityId LEFT JOIN ow_newsfeed_follow follow ON action_feed.feedId = follow.feedId AND action_feed.feedType = follow.feedType WHERE (`base_user_suspend_table_alias`.`id` IS NULL) AND cactivity.userId = :u AND activity.status=:s AND activity.timeStamp<:st AND ( ( follow.userId=:u AND activity.visibility & :vf ) ) UNION SELECT action.`id`, action.`entityId`, action.`entityType`, action.`pluginKey`, action.`data`, activity.timeStamp FROM ow_newsfeed_action action INNER JOIN ow_newsfeed_activity activity ON action.id = activity.actionId INNER JOIN `ow_newsfeed_action_set` cactivity ON action.id = cactivity.actionId INNER JOIN `ow_base_user` base_user_table_alias ON base_user_table_alias.`id` = `cactivity`.`userId` LEFT JOIN `ow_base_user_suspend` base_user_suspend_table_alias ON base_user_suspend_table_alias.`userId` = `base_user_table_alias`.`id` WHERE (`base_user_suspend_table_alias`.`id` IS NULL) AND cactivity.userId = :u AND activity.status=:s AND activity.timeStamp<:st AND ( ( activity.userId=:u AND activity.visibility & :va ) ) UNION SELECT action.`id`, action.`entityId`, action.`entityType`, action.`pluginKey`, action.`data`, activity.timeStamp FROM ow_newsfeed_action action INNER JOIN ow_newsfeed_activity activity ON action.id = activity.actionId INNER JOIN `ow_newsfeed_action_set` cactivity ON action.id = cactivity.actionId INNER JOIN `ow_base_user` base_user_table_alias ON base_user_table_alias.`id` = `cactivity`.`userId` LEFT JOIN `ow_base_user_suspend` base_user_suspend_table_alias ON base_user_suspend_table_alias.`userId` = `base_user_table_alias`.`id` INNER JOIN ow_newsfeed_action_feed action_feed ON activity.id=action_feed.activityId WHERE (`base_user_suspend_table_alias`.`id` IS NULL) AND cactivity.userId = :u AND activity.status=:s AND activity.timeStamp<:st AND ( ( action_feed.feedId=:u AND action_feed.feedType="user" AND activity.visibility & :vfeed ) ) UNION SELECT action.`id`, action.`entityId`, action.`entityType`, action.`pluginKey`, action.`data`, activity.timeStamp FROM ow_newsfeed_action action INNER JOIN ow_newsfeed_activity activity ON action.id = activity.actionId INNER JOIN `ow_newsfeed_action_set` cactivity ON action.id = cactivity.actionId INNER JOIN `ow_base_user` base_user_table_alias ON base_user_table_alias.`id` = `cactivity`.`userId` LEFT JOIN `ow_base_user_suspend` base_user_suspend_table_alias ON base_user_suspend_table_alias.`userId` = `base_user_table_alias`.`id` INNER arJOIN ow_newsfeed_activity subscribe ON activity.actionId=subscribe.actionId and subscribe.activityType=:as AND subscribe.userId=:u WHERE (`base_user_suspend_table_alias`.`id` IS NULL) AND cactivity.userId = :u AND activity.status=:s AND activity.timeStamp<:st ) b GROUP BY b.`id` ORDER BY MAX(b.timeStamp) DESC LIMIT 0, 10


array ( 'u' => 737, 'va' => 4, 'vf' => 2, 'vfeed' => 8, 's' => 'active', 'st' => 1447755663, 'peb' => 'everybody', 'ac' => 'create', 'as' => 'subscribe', )


Execution time 9.939530


what is it?



Thank you Tammy, but no php error shows :(


Thank you



The Forum post is edited by Simone Nov 17 '15
ross Team
ross Nov 18 '15
Yes, we are aware of that problem, we do our best to resolve it asap. Thanks for the report
Simone
Simone Nov 18 '15
Ok, Thank you ross!
tammy harris
tammy harris Nov 19 '15
can some one tell what ow_profile_enable true does 
and how its used 
ross Team
ross Nov 19 '15
it enables set of statistics that describes how often and for how long various parts of the program executed and you can clear the cache with it. 
tammy harris
tammy harris Nov 19 '15
cool how do you view these stats ?
ross Team
ross Nov 19 '15
enable it and you will see them at the bottom of the page
tammy harris
tammy harris Nov 19 '15
ok cool
im my config sergay put this in so it must just enable it for one profile or something
 define('OW_PROFILER_ENABLE', isset($_GET['aaa']));
Jordi
Jordi Nov 19 '15
Yes it would be great if you can enable this just for one profile. ( admin )
ross Team
ross Nov 19 '15
I don't know, contact sergay to find that out