Hello Zope-List, I hope I'm in the appropriate list ;-) I'm trying to configure Zope-2.7.3 with ZEO (this is my first experience with Zope > 2.5.x) and I read somewhere that in the configuration file 'zeo.conf' in the <zeo>-section you can set the key 'address' to a 'host:port' pair or a 'unix domain socket'. In the <runner>-section there is also a 'socket-name' key, that's default value is '$INSTANCE/etc/zeo.zdsock'. Now: what is the difference between the 'address' (when set to a socket) and the 'socket-name'? And where has the zope-client to 'point to'? address od socket-name? Thank you!! Regards, Michele Marcionelli -- Michele Marcionelli - webmaster@math - Phone: +41 1 632 6193 Address: HG G 14 - Raemistrasse 101 - 8092 Zürich - Switzerland
On Mon, 2004-12-13 at 16:36 +0100, Michele Marcionelli wrote:
Hello Zope-List,
I hope I'm in the appropriate list ;-)
I'm trying to configure Zope-2.7.3 with ZEO (this is my first experience with Zope > 2.5.x) and I read somewhere that in the configuration file 'zeo.conf' in the <zeo>-section you can set the key 'address' to a 'host:port' pair or a 'unix domain socket'.
Yup. If that's true (I haven't read the config file), a "host:port" pair means e.g. "localhost:9999", while a "unix domain socket" would be something like "/a/path/to/zeo.sock'
In the <runner>-section there is also a 'socket-name' key, that's default value is '$INSTANCE/etc/zeo.zdsock'.
Now: what is the difference between the 'address' (when set to a socket) and the 'socket-name'? And where has the zope-client to 'point to'? address od socket-name?
The 'socket-name' key in the <runner> section is not related to ZEO. Ignore it. The 'address' when set to a unix domain socket value needs to point to the socket file that the ZEO server creates (if it is configured to do so; it has its own configuration file). The 'address', when set to a "hostname:port" setting must point to the host name and port on which the ZEO server is listening (again, see the ZEO server configuration). - C
Hello Chris, 1. Thank you very much! 2. Since I am planing to run two zope clients on the same (dual processor) machine, I think that it is better to use socket (faster) instead of tcp/ip. Is that correct? 3. You said that the 'socket-name' key in the <runner> section is not related to ZEO... but what is the <runner> section for? Thank you again! Michele
I'm trying to configure Zope-2.7.3 with ZEO (this is my first experience with Zope > 2.5.x) and I read somewhere that in the configuration file 'zeo.conf' in the <zeo>-section you can set the key 'address' to a 'host:port' pair or a 'unix domain socket'.
Yup. If that's true (I haven't read the config file), a "host:port" pair means e.g. "localhost:9999", while a "unix domain socket" would be something like "/a/path/to/zeo.sock'
In the <runner>-section there is also a 'socket-name' key, that's default value is '$INSTANCE/etc/zeo.zdsock'.
Now: what is the difference between the 'address' (when set to a socket) and the 'socket-name'? And where has the zope-client to 'point to'? address od socket-name?
The 'socket-name' key in the <runner> section is not related to ZEO. Ignore it.
The 'address' when set to a unix domain socket value needs to point to the socket file that the ZEO server creates (if it is configured to do so; it has its own configuration file). The 'address', when set to a "hostname:port" setting must point to the host name and port on which the ZEO server is listening (again, see the ZEO server configuration).
- C
Michele Marcionelli wrote:
Since I am planing to run two zope clients on the same (dual processor) machine, I think that it is better to use socket (faster) instead of tcp/ip. Is that correct?
Configuring the ZEO server to listen only on a Unix-domain socket doesn't allow you to scale as well, because it requires that the appserver(s) run on the same machine as the storage. Given that restrictin, it should be faster than talking through the 'localhost' interface (although 'localhost' access is often optimized by the kernel).
You said that the 'socket-name' key in the <runner> section is not related to ZEO... but what is the <runner> section for?
The 'zopectl' process is a shell which talks to a "daemon manager" process, which in turn forks and runs Zope as a daemon. zopectl communicates with the daemon manager via a Unix-domain socket, which is configured (among other options) in the <runner> section. Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com
On Wed, Dec 15, 2004 at 11:39:08AM -0500, Tres Seaver wrote:
Michele Marcionelli wrote:
Since I am planing to run two zope clients on the same (dual processor) machine, I think that it is better to use socket (faster) instead of tcp/ip. Is that correct?
Configuring the ZEO server to listen only on a Unix-domain socket doesn't allow you to scale as well, because it requires that the appserver(s) run on the same machine as the storage. Given that restrictin, it should be faster than talking through the 'localhost' interface (although 'localhost' access is often optimized by the kernel).
You said that the 'socket-name' key in the <runner> section is not related to ZEO... but what is the <runner> section for?
The 'zopectl' process is a shell which talks to a "daemon manager" process, which in turn forks and runs Zope as a daemon. zopectl communicates with the daemon manager via a Unix-domain socket, which is configured (among other options) in the <runner> section.
Do you have an example of this? I've been looking for a way of specifying the name of a socket, but have been able to do it so far.
Tres. -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com
-- John
Hi John,
Do you have an example of this?
Of course. A default one is automatically generated with 'mkzeoinstance.py' (Zope-2.7.3): --- begin of zeo.conf ---------------------------------------- # ZEO configuration file %define INSTANCE /scratch/zope/zeo <zeo> # address 9999 address /scratch/zope/.zeo-socket read-only false invalidation-queue-size 100 # monitor-address PORT # transaction-timeout SECONDS </zeo> <filestorage 1> path $INSTANCE/var/Data.fs </filestorage> <eventlog> level info <logfile> path $INSTANCE/log/zeo.log </logfile> </eventlog> <runner> program $INSTANCE/bin/runzeo # socket-name $INSTANCE/etc/zeo.zdsock daemon true forever false backoff-limit 10 exit-codes 0, 2 directory $INSTANCE default-to-interactive true # user zope user zope python /usr/local/bin/python2.4 zdrun /scratch/local/app/zope/2.7.3/lib/python/zdaemon/zdrun.py # This logfile should match the one in the zeo.conf file. # It is used by zdctl's logtail command, zdrun/zdctl doesn't write it. logfile $INSTANCE/log/zeo.log </runner> --- end of zeo.conf ------------------------------------------ Regards, Michele
I've been looking for a way of specifying the name of a socket, but have been able to do it so far.
-- Michele Marcionelli - webmaster@math - Phone: +41 1 632 6193 Address: HG G 14 - Raemistrasse 101 - 8092 Zürich - Switzerland
Quoting Michele Marcionelli (michele.marcionelli@math.ethz.ch):
2. Since I am planing to run two zope clients on the same (dual processor) machine, I think that it is better to use socket (faster) instead of tcp/ip. Is that correct?
Question...(depending on the OS) instead of running two separate clients on the same machine, could one not just run more threads, and either allow the OS to schedule them on the other processor, or bind the LWP to the other processor as needed?? By using LWPs, you have the benefits of a single address space, which can reduce/remove the need for IPC (though you do have a form with thread communication/sync calls), and you don't have to go through the hassles of setting up zeo. - Doug -- Douglas Wade Needham - KA8ZRT UN*X Consultant & UW/BSD kernel programmer Email: cinnion @ ka8zrt . com http://cinnion.ka8zrt.com Disclaimer: My opinions are my own. Since I don't want them, why should my employer, or anybody else for that matter!
Quoting Michele Marcionelli (michele.marcionelli@math.ethz.ch):
2. Since I am planing to run two zope clients on the same (dual processor) machine, I think that it is better to use socket (faster) instead of tcp/ip. Is that correct?
Question...(depending on the OS) instead of running two separate clients on the same machine, could one not just run more threads, and either allow the OS to schedule them on the other processor, or bind the LWP to the other processor as needed?? By using LWPs, you have the benefits of a single address space, which can reduce/remove the need for IPC (though you do have a form with thread communication/sync calls), and you don't have to go through the hassles of setting up zeo.
Hemm, well: I'm running 'Red Hat Enterprise Linux AS release 3' on an 'Intel Dual Xeon 2.8GHz' with hyper-threading... What do you suggest me? Regards, Michele
On Dec 15, 2004, at 22:30, Michele Marcionelli wrote:
Quoting Michele Marcionelli (michele.marcionelli@math.ethz.ch):
2. Since I am planing to run two zope clients on the same (dual processor) machine, I think that it is better to use socket (faster) instead of tcp/ip. Is that correct?
<snip>
Hemm, well: I'm running 'Red Hat Enterprise Linux AS release 3' on an 'Intel Dual Xeon 2.8GHz' with hyper-threading... What do you suggest me?
Hi Michele, No, just use two separate ZEO clients. There is no pain in setting up ZEO in Zope 2.7+ and any nonstandard setup will just prove to be a maintenance hassle later. Whether you use file sockets to talk to a ZEO server or not depends on where the ZEO server is. If it's on the same box that's a good idea. If the ZEO server os on a different box you'll obviously need to talk through network sockets. jens --------------- Jens Vagelpohl jens@zetwork.com Software Engineer +49-(0)441-36 18 14 38 Zetwork GmbH http://www.zetwork.com/
participants (6)
-
Chris McDonough -
Douglas Wade Needham -
Jens Vagelpohl -
John Poltorak -
Michele Marcionelli -
Tres Seaver