On 03/16/2010 01:50 PM, Glenn McGurrin wrote:
I have a bunch of questions regarding several things. First group, I
think I heard something about 0.9x being able to handle multiple
installations from one queue daemon set, is there a guide for doing
this?
There's not a lot of administrator documentation on that end yet, other
than a couple notes in the README. Some general info on the changes to
the daemon architecture are on the wiki:
http://status.net/wiki/Daemon_redesign
Roughly:
* Set up a shared database with the status_network table (db/site.sql)
to list some low-level config info on your sites
* Use the Status_network::config() stuff to set things up at the top of
your config.php
* Set up ActiveMQ and configure StatusNet's queues to use the stomp
interface
* run queuedaemon.php -ssome_site_name --all
Each site needs a unique 'nickname' identifier in the status_network
table; the nickname will be used to mark queue items as to which site
they belong to and switch to the appropriate config when processing.
Also how would that affect memory usage for them?
Switching configurations at runtime can leak more memory than a
single-site daemon would, but that's ok. Not only do you get to avoid
running tens/hundreds/thousands of processes simultaneously (which would
use a lot *more* memory!) but in 0.9, queuedaemon.php and xmppdaemon.php
have new smarts for dealing with memory leaks.
The daemons spawn one or more subprocesses to perform actual work, while
the parent process monitors the workers for orderly or disorderly exits
and respawns new processes to replace them if they die unexpectedly.
The worker processes monitor their own memory usage at each run through
the event loop, and if they find they've gone over a "soft memory limit"
they exit gracefully, to be replaced by a fresh worker.
This in most cases avoids hitting PHP's hard memory_limit setting, which
can halt processing unexpectedly in the middle of something. By default
the soft limit is set at 90% of PHP's memory_limit, but can be
overridden with either a relative or absolute value in
$config['queues']['softlimit'].
I also heard
something about the memory usage going down in 0.9x from 0.8x, what is
the current estimated usage?
A number of memory leaks have been plugged, which helps keep the memory
usage from running away as quickly on the daemons. With the new memory
management you shouldn't have to worry too much about it, as long as the
memory limit is high enough that the process doesn't hit it during
startup! If the daemons respawn too often, push the limit a bit higher.
Actual memory usage will vary with workload, processor architecture, and
PHP version.
Third group, I am trying to design a (mostly) free SMS sending service
for use via an API that does not need the carrier to send messages. I
tend to think of the requirement to enter the carrier as a weakness of
statusnet and I was curious how hard it would be to implement a plugin
to use such a service and remove the carrier question?
Shouldn't be too hard in theory but will take a little work breaking
bits out of core first; we've been thinking about breaking SMS support
out to a plugin and making the actual backend pluggable as well.
-- brion
_______________________________________________
StatusNet-dev mailing list
StatusNet-dev@lists.status.net
http://lists.status.net/mailman/listinfo/statusnet-dev