Advertisement:

Author Topic: Osclass Memory Usage and Caching  (Read 12897 times)

Aficionado

  • Guest
Re: Osclass Memory Usage
« Reply #15 on: May 12, 2015, 03:56:32 am »
Well, what dev101 mentioned is correct, it is almost impossible to get accurate memory consumption or processor consumption for a single application running on a server let alone on shared hosting where resources are shared and load balanced over other clients with their websites.

It should be possible to get insights on how your application is doing under different loads = nr. of requests per time frame vs. page load per request. That will show you over time an average based on which you can decide to scale up or down in hosting resources. In the end what you want is to serve and leave a good site impression so the accuratesse of memory / processor I think is less interesting though that ofcourse is what is needed to get performance for starters.

I wonder if the use (in my case) of CloudLinux makes any difference. Because of what CloudLinux is famous: the almost complete isolation between users on all resources.

Also what we are talking about, makes me think. I use a caching plugin for Wordpres that checks the cpu server load and tunes accordingly. If that number is not right, then ....


dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: Osclass Memory Usage
« Reply #16 on: May 12, 2015, 03:57:47 am »
One thing to keep in mind it is not irrelevant how your PHP is running (as apache module or fcgi). As I said, things are complicated to build a reliable tool :(

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: Osclass Memory Usage
« Reply #17 on: May 12, 2015, 04:15:13 am »
It should be possible to get insights on how your application is doing under different loads = nr. of requests per time frame vs. page load per request. That will show you over time an average based on which you can decide to scale up or down in hosting resources. In the end what you want is to serve and leave a good site impression so the accuratesse of memory / processor I think is less interesting though that ofcourse is what is needed to get performance for starters.
You already have the tools (or should have) in your cPanel or whatever to get that insight:

- Number of visitors/sessions
- Your server resource usage (CPU/RAM/Bandwidth/etc)

Your hosting provider already has the means to accurately measure them, how else could they do their business? What we are talking about here primarily is the possibility of presenting that data directly inside admin dashboard via PHP, in accurate and reliable way.

Aficionado

  • Guest
Re: Osclass Memory Usage
« Reply #18 on: May 12, 2015, 09:33:11 pm »
Well, I'm currently thinking and developing one like this !
(It will be available for free on the market ;) but I don't know exactly when though)

If you have any suggestions, I'll be glad to include it in my thoughts and plugin :)

I would like to give you an other developing suggestion. A caching plugin for Osclass. You could charge also for it, since it is not very simple to do. For some reason a caching plugin was started but never finished (there are a couple at github).

By caching i mean all ads to have a STATIC html to be shown to the visitors (non-logged users).



dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: Osclass Memory Usage
« Reply #19 on: May 12, 2015, 10:00:29 pm »
I already have one :) that fully works for item pages, including dynamic links, plugins, cookies, multi-language, with comments pagination etc., but it is not for public release yet. There are many themes that needs to be checked, and I do not have access to all of them. Also, no caching of main, static and search pages (one step at a time and search will be skipped), but item pages are spotless so far.

Aficionado

  • Guest
Re: Osclass Memory Usage
« Reply #20 on: May 12, 2015, 10:10:55 pm »
I already have one :) that fully works for item pages, including dynamic links, plugins, cookies, multi-language, with comments pagination etc., but it is not for public release yet. There are many themes that needs to be checked, and I do not have access to all of them. Also, no caching of main, static and search pages (one step at a time and search will be skipped), but item pages are spotless so far.

If it works and it is reasonably priced, it would be a tremendous hit. And you could be filthy rich by the end of 2015.  ;D
« Last Edit: May 12, 2015, 10:45:22 pm by Aficionado »

cartagena68

  • issues
  • Hero Member
  • *
  • Posts: 1198
Re: Osclass Memory Usage
« Reply #21 on: May 12, 2015, 10:28:44 pm »
Quote
I would like to give you an other developing suggestion. A caching plugin for Osclass. You could charge also for it, since it is not very simple to do. For some reason a caching plugin was started but never finished (there are a couple at github).

Actually i'm using my plugincache on latest osclass versions and it save me.
Before i had a dedicated server and i had no problem with my sites. Then, due to money problem, i transfer all to a basic shared hosting (the one that you, Aficionado, hated most. Hostgator), andstarted all the problems related to cpu and memory use ( they suspend my account few times). So i installed my plugincache and all problem stop.
The only problem remaining are the inodes, i solve that on my site with most traffic (300/500 ads a day) setting an expiration date and using my renew ads plugin to delete the expired ads.
With plugincache the cache files for items are stored in subfolders that you can set to be by day, month or year, so you can easy manually delete the older folder.
The file is created when somebody visit the ad
You can set the cache only for items or you can cache also main page and static pages.
For me is working fine, i don't add it to my site because of the known isuues with facebook login plugin and the list/grid view in bender theme.

Said that, if a better cache plugin is created, i would be happy to have it.

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: Osclass Memory Usage
« Reply #22 on: May 12, 2015, 10:44:43 pm »
@ Aficionado
Never gonna happen :)

Thing is, I always spend few months for every plugin to perform beta testing after I mark it "ready for release" (my latest plugin was an exception). I don't plan to release half-baked ones no matter how interesting and exciting they are and annoy users to do my beta job for me instead. There are also few plugins (e.g. facebook plugin) that I need to check against it, to make sure they will not break. I know there is an urge for this, but no rush for good reasons.

@ cartagena68
I have some specific requirements on my setup that plugincache does not take into account at all, so had to re-invent the wheel. This is why I essentially reverted to the original version by core team and completely rewritten it's code. Also implemented some additional security checks, bug fixes along the way, smart cron cleanup... Trouble is now I am working on some other stuff and have to leave this project on a side. I have not decided yet how to proceed with main page, because of many different themes out there (it's becoming a real jungle).

SmaRTeY

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2519
Re: Osclass Memory Usage
« Reply #23 on: May 13, 2015, 12:05:41 am »
Cache is interesting! .... What do you guys use on your server setup for this? (if you know)
Actually for me first thing I did was tweak my VPS (better than shared hosting cheaper than dedicated) and deciding what cache mechanisms to implement since there are a few options you have with php-fpm, apache config (which can also be done in htacces but skipping htaccess delivers a performance boost on apache) and then there's php opcache nowadays and together with the browser caching setup and gzip maybe even with the use of a CDN things will run pretty awesome. Nowadays Osclass also supports the use of memcache and apc if I am correct which helps.

As for cache plugin Osclass, the item pages should indeed be cached by Osclass as well as the regular pages. One thing to be carefull with is as dev mentioned the search, you never want search pages to be cached UNLESS there's an acceptable timelimit setup for these.
Also ad pages in cache should be renewed based on deleting of ads, preferably straight away to prevent ghost pages flying around  8)

Is your plugin comparable with the Wordpress cache plugin Dev101?

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: Osclass Memory Usage
« Reply #24 on: May 13, 2015, 12:44:27 am »
We are away from the original topic and nobody here have any mod privileges to split it into 3 directions it is headed, now becoming a real mess :)

@ SmaRTeY
In your first part of the post you touched several things that are all different, not sure what you are pointing to? In any case, dynamic caching does not mutually exclude static caching, they can both work and live in harmony.

As for the last question, WordPress has many plugins of this kind, some are very complex because they offer additional features (not only caching) and they are of different architecture from Osclass (as you already know that). Not sure which one do you have in mind? I have only briefly tested few. Many WP plugins offer js/html/css minify+combining as extra features, which I don't like at all inside Osclass. Why? There are sensitive plugins and theme parts that break every time with any minifying script tested out there.

Aficionado

  • Guest
Re: Osclass Memory Usage
« Reply #25 on: May 13, 2015, 01:16:18 am »

As for cache plugin Osclass, the item pages should indeed be cached by Osclass as well as the regular pages. One thing to be carefull with is as dev mentioned the search, you never want search pages to be cached UNLESS there's an acceptable timelimit setup for these.
Also ad pages in cache should be renewed based on deleting of ads, preferably straight away to prevent ghost pages flying around  8)


Also Items cache should be refreshed when deleted and also Edited/Changed.


For Wordpres, since you asked, for caching plugin, only TWO work very well (no matter what crap they say for other caching Stars), 1. Hyper Cache and 2. ZenCache (formely QuickCache).


cartagena68

  • issues
  • Hero Member
  • *
  • Posts: 1198
Re: Osclass Memory Usage
« Reply #26 on: May 13, 2015, 01:36:17 am »
Quote
Also Items cache should be refreshed when deleted and also Edited/Changed.

That is also done in plugincache

Aficionado

  • Guest
Re: Osclass Memory Usage
« Reply #27 on: May 13, 2015, 01:36:45 am »

Before i had a dedicated server and i had no problem with my sites. Then, due to money problem, i transfer all to a basic shared hosting (the one that you, Aficionado, hated most. Hostgator), andstarted all the problems related to cpu and memory use ( they suspend my account few times). So i installed my plugincache and all problem stop.


Because cached static pages don't count in hosting limitations, No entry processes and no sql connections. Caching, even a simple one, will solve most problems with shared hosting. As i did with Wordpress.


Aficionado

  • Guest
Re: Osclass Memory Usage
« Reply #28 on: May 13, 2015, 01:39:42 am »
I have not decided yet how to proceed with main page, because of many different themes out there (it's becoming a real jungle).

Main page ! Ok, how about let the webmaster to select if he wants to be cached or not. Or refresh the main page when some recent ad is edited or deleted. It is so very SAME with the LOGIC that Wordpress caching works. Maybe the internal is different but the logic is 100% the same. The Blog Posts are for Osclass the Item ads.

Aficionado

  • Guest
Re: Osclass Memory Usage
« Reply #29 on: May 13, 2015, 01:41:18 am »


Is your plugin comparable with the Wordpress cache plugin Dev101?

I have no idea what dev101 plugin is (for the moment) but i do know inside-out all the Wordpress plugins. And they are very mature. If you need help, just pm me.
« Last Edit: May 13, 2015, 01:53:33 am by Aficionado »