[Owncloud] Session Handling

Frank Karlitschek frank at owncloud.org
Sat Oct 13 09:52:10 UTC 2012


Hi Arthur,

first of all. Thanks for looking into performance. This is very important.

I think it´s a myth that session creation is a significant performance factor in our case. I worked on PHP systems with 100.000 times more hits than a normal ownCloud installation without problems in the session management. And a working session is a essential part of a modern web application.
I would like to see performance measurements that show a performance impact in our case before we change the current behavior. 

But it´s true that we definitely have to improve and optimize the ownCloud performance.
The biggest problems currently are, in my opinion:
1. Database. Not optimized queries, non existing indices, wrong field types and too much queries in general.
2. Hook System. The stuff that happens if certain events happen, like for example saving of a file, is completely unclear and at first sight horrible at the moment.

I suggest to do the following:

Create a new "PROFILING" switch in config.php similar to "DEBUG"

Add a "ProfilingEvent" call that takes an event ann writes it into a local profiling logfile together with an event type and a timestamp.
Add this ProfilingEvent call to OC_DB and OC_Hook.

Then just do a tail -f to the profiling log and do stuff like syncing a folder or mounting an external filesystem. There are things that we have to improve that have a magnitude more impact than a php session.


Frank


On 13.10.2012, at 00:19, Arthur Schiwon <blizzz at owncloud.com> wrote:

> Hey,
> 
> i just had a discussion with Danimo regarding initialization of Session. When 
> the client or any WebDAV client connects for example a session is being 
> created on each request, but it is not used for this purpose. All WebDAV 
> action work fine without Sessions even in the Shared folder. I assume this will 
> be the same for CalDAV and CardDAV. I checked it with the diff as attached. I 
> remember session creation was really expensive (is it still so? didn't check), 
> so we can get rid of it in cases where we do not need them.
> 
> As better solution we could make a Helper method isSessionRequired() (or even 
> in Base) that checks the request. Depending on the return value initSession() 
> is executed or not.
> 
> Cheers
> Arthur<session.diff>_______________________________________________
> Owncloud mailing list
> Owncloud at kde.org
> https://mail.kde.org/mailman/listinfo/owncloud




More information about the Owncloud mailing list