Home
The Toolkit for Online Communities
17110 Community Members, 1 member online, 2047 visitors today
Log In Register
OpenACS Home : xowiki : Weblog
Search · Index
Previous Month July 2014
Sun Mon Tue Wed Thu Fri Sat
29 30 1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 (1) 23 (1) 24 (1) 25 26
27 28 29 30 31 1 2

Popular tags

ad_form , ADP , ajax , aolserver , asynchronous , bgdelivery , bugtracker , COMET , cvs , debian , emacs , fedora , FreeBSD , hstore , includelets , install , installation , installers , javascript , libthread , linux , monitoring , naviserver , nginx , nx , OmniOS , oracle , osx , patches , performance

1 registered user in community xowiki
in last 30 minutes

Contributors

OpenACS.org

Weblog

Filtered by popular tag patches, 1 of 1 Postings (all, summary)

Boost your application performance to serve large files!

Created by Rocael Hernández Rizzardini, last modified by Gustaf Neumann 24 Nov 2008, at 03:23 PM

In order to speed up file-deliveries, one can use the background delivery methods provided by xotcl-core. The main advantage is that with background delivery the costly connection threads are just used for permission checking and locating the file, and the time-consuming spooling of the file to the client is implemented in an asynchronous background delivery thread. Therefore, connection thread are not blocked, it is possible to spool simultaneously several hundred (thousand?) files with only a few connection threads configured.

We use this in production since several years. For example today (no semester yet) we had so far 150.000 file deliveries by background delivery.

The asynchrounous background delivery requires a small patch (2 changes, one is a backport from naviserver) and the tcl thread library (by zoran). The application code is in XOTcl is only a few lines of code and is included in xotcl-core (bgdelivery-procs.tcl).

One needs the following patch to

The patch is already included in the current head version of aolserver 4.5 and in naviserver.

With this patch and xotcl-core, one can replace


ns_returnfile 200 $mime_type $filename
by

ad_returnfile_background 200 $mime_type $filename
e.g. in cr_write_content in acs-content-repository/tcl/revision-procs.tcl to activate it and to deliver files from the content-repository (file-store) in the background.

The connection thread is only used for permission management, localization of the file and writing the the reply header, the actual delivery of the file is performed via asychronous io without using up many resources. This can handle probably a couple of thousand concurrent file deliveries without running out of resources.

Check the files that has been served since the last reboot of your aolserver using this method from the developer support shell:

bgdelivery do set delivery_count


Original thread:
http://openacs.org/forums/message-view?message_id=482221