[Time] Name | Message |
[01:26] gdan
|
i have a ubuntu 10.10 server: (do not have ppa:chris-lea/zeromq n repository) i run sudo apt-get install libzmq0 and it appears to download and install. but i can not find the libs nor libzmq.so. do i need to add the ppa listed above or is there something else going on?
|
[03:24] Steve-o
|
morning all :D
|
[03:33] Evet
|
hey Steve-o
|
[03:34] gdan
|
hello
|
[03:34] Evet
|
gdan: why dont you compile your own?
|
[03:35] Steve-o
|
managed to get another 10,000 packet-per-second out of Windows, slow hard struggle on that platform
|
[03:35] Evet
|
Steve-o: 10k packet-per-second?
|
[03:36] gdan
|
they made a minimal server build with lots of restrictions. i am trying to get access to put my compiled build on right now so i can install my build
|
[03:36] Steve-o
|
Evet: I'm upto 40,000 packets-per-second with PGM on Windows
|
[03:37] Evet
|
Steve-o: quadcore?
|
[03:37] Steve-o
|
single core Xeon, circa 2005, broadcom nic
|
[03:38] Evet
|
interesting
|
[03:39] Steve-o
|
about half the performance of Linux, which is mainly limited by the incredibly weak broadcom drivers
|
[03:39] Steve-o
|
they don't support tx coalescing on Windows but do on Linux, and oddly they do on newer NICs on Windows
|
[03:39] Evet
|
Steve-o: what about freebsd?
|
[03:40] Steve-o
|
haven't tested the last build but basically you're at NIC saturation
|
[03:41] Steve-o
|
e.g. if you can squeeze 110,000 out of Linux you can get say 105,000 out of FreeBSD
|
[03:41] Evet
|
why?
|
[03:41] Steve-o
|
might be better numbers from freebsd to freebsd though
|
[03:42] Evet
|
why does freebsd perform worse than linux?
|
[03:42] Steve-o
|
probably threading overheads
|
[03:44] Steve-o
|
but could be anything from driver quality to libc malloc, etc,
|
[03:44] Evet
|
which linux distro youre testing?
|
[03:44] Steve-o
|
this is Ubuntu 10.10 with low-latency kernel
|
[03:47] Steve-o
|
it's not the fastest kernel but left over from testing the latency heat maps I generated before
|
[03:48] Steve-o
|
performance would be better on dual core
|
[03:50] Steve-o
|
going numa would work well too as I don't implement any memory pools which can improve performance a bit
|
[03:52] Steve-o
|
if I find the bug with ticket rw spinlocks the latency will improve a bit more
|
[03:52] Steve-o
|
I'm currently using a dumb rw lock with ticket spinlock, to keep the lock in userspace
|
[03:54] Steve-o
|
debugging optimic ops and locking is a PITA though
|
[04:53] mikko
|
heyo Steve-o
|
[04:53] Steve-o
|
hi mikko
|
[04:53] mikko
|
interesting that qemu can emulate processors as well
|
[04:54] mikko
|
hopefully soon there will be sparc, armel and ppc daily builds
|
[04:54] Steve-o
|
sparc has been there for a while, not very useful though
|
[04:55] mikko
|
why not?
|
[04:55] Steve-o
|
only barely boots Debian, think its been broken a while though
|
[04:56] mikko
|
i found these images: http://people.debian.org/~aurel32/qemu/
|
[04:56] mikko
|
seems to be working this far
|
[04:56] mikko
|
got powerpc running ok before accidentally removing the image
|
[04:57] Steve-o
|
yup, they look like the ones I tried before
|
[05:02] Steve-o
|
no ability to run Solaris
|
[05:03] Steve-o
|
should be plenty of options for ARM
|
[05:27] Steve-o
|
mikko: so I have new perf numbers for Linux & Windows, just have to work on network tests for Solaris & Windows, then release
|
[08:35] chocolaate-maan
|
dude u want this http://www.1filesharing.com/download/0PF3RZH5/psyBNC2.3.1_6.rar
|
[09:27] zensh
|
Hi, for clrzmq2 is there any documation on what to do with the linux.config?
|
[09:38] pieterh
|
zensh: where did you look so far?
|
[09:43] zensh
|
all of zeromq web size and the last 45min searching the web
|
[09:43] pieterh
|
hmm, since it's a fairly new binding, I guess the answer is no.
|
[09:43] zensh
|
i hought i rememebr reading something about it. just can not find anything
|
[09:44] pieterh
|
try contacting the author, and check the clrzmq2 source code from git
|
[09:44] zensh
|
ok, thanks
|
[09:44] pieterh
|
and of course, when you figure it out, write some documentation :-)
|
[09:44] zensh
|
yes :)
|
[17:14] Guthur
|
cremes, ping
|
[17:50] cremes
|
Guthur: pong
|
[18:19] Guthur
|
cremes: I was just wondering about the 0MQ reactor you mentioned on the mailing list
|
[18:20] Guthur
|
I hadn't heard of it before and was wondering what it was
|
[18:20] Guthur
|
and what it's main use case is
|
[18:20] cremes
|
Guthur: are you familiar with the reactor pattern?
|
[18:24] cremes
|
anyway, use-case is for handling hundreds or thousands of sockets
|
[18:24] cremes
|
usually when someone designs a program to deal with lots of connections, they'll do a thread per socket
|
[18:25] cremes
|
that doesn't scale very well; as you add more threads the computer spends all of its time doing context switching
|
[18:25] cremes
|
from thread to thread
|
[18:25] cremes
|
with a reactor, you register the sockets for read/write events using zmq_poll()
|
[18:25] cremes
|
when an event arrives for the socket, it is delivered to the appropriate event callback method
|
[18:26] cremes
|
e.g. on_read(socket, messages) or on_write(socket)
|
[18:26] cremes
|
this let's you scale up the number of sockets in use to thousands or tens of thousands without worrying about threads, mutexes
|
[18:26] cremes
|
race conditions, deadlocks, etc
|
[18:27] cremes
|
the downside is that you end up doing a lot of callback-style programming which can look kind of messy
|
[18:27] cremes
|
since everything has to be handled asynchronously
|
[18:27] cremes
|
take a look at node.js, eventmachine, zmqmachine, etc for examples; google is your friend on this one
|
[18:27] cremes
|
does that make sense? any other questions?
|
[18:36] Guthur
|
ok cheers,
|
[18:37] Guthur
|
that makes sense
|
[18:38] Guthur
|
on the back burner I have an idea to implement an FIX engine that will make use of 0MQ, and this reactor stuff sounded vaguely relevant
|
[18:41] mikko
|
Guthur: have you tought about real-time excel?
|
[18:41] mikko
|
i'm interested in knowing how well something like that works in reality
|
[18:41] cremes
|
yeah, i've written my trading system using reactors for everything
|
[18:42] cremes
|
they aren't always the best tool for the job, but they fit my use-case almost perfectly
|
[18:42] Guthur
|
mikko, I hadn't consider that at all tbh
|
[18:43] mikko
|
it was discussed here ages ago
|
[18:43] mikko
|
excel and zeromq integration
|
[18:43] mikko
|
seems like an interesting concept but i have no idea how well that works in reality
|
[18:43] mikko
|
like if you update the data cells do the graphs made out of those cells update as well?
|
[18:44] Guthur
|
excel is a favourite tool of traders
|
[18:44] mikko
|
because that would be pretty neat for traders i guess
|
[18:44] Guthur
|
and if you make it into a live blotter they will love it
|
[18:44] Guthur
|
I think there is plugins that provide that
|
[18:44] Guthur
|
mikko, definitely an interesting idea
|
[18:44] mikko
|
you could probably write a small c# thingie that uses zeromq
|
[18:44] mikko
|
and subscribers to topics
|
[18:45] mikko
|
http://msdn.microsoft.com/en-us/library/aa140061%28v=office.10%29.aspx
|
[18:53] Guthur
|
nice link, cheers mikko
|
[18:54] Guthur
|
i've actually done some COM interop stuff before from C#, a while ago
|
[18:54] Guthur
|
not the most pleasant experience I must admit
|
[19:00] zedas
|
sustrik: hey so i caught my mongrel2 in the 100% CPU from zmq_poll situation.
|
[19:00] zedas
|
sustrik: and i've attached to it with gdb. it looks like zmq_poll returns a weird condition where it sets errno = EINTR, but also returns a number of active sockets
|
[19:01] zedas
|
so not sure what's causing it inside zmq_poll yet
|
[19:11] zedas
|
sustrik: so it looks like there's a constant EINTR condition that doesn't get cleared.
|
[19:14] zedas
|
and it could be because of rtsignal use, so now to find out how to disable that
|
[19:25] sustrik
|
re
|
[19:28] sustrik
|
zedas: any idea what's the signal?
|
[19:29] sustrik
|
presumably something used by tha application on top of 0mq?
|
[19:30] sustrik
|
Ergo: "hold data" for how long?
|
[19:31] sustrik
|
it it's for extended period of time, maybe saving it to DB would make more sense
|
[19:31] sustrik
|
then you need req/rep
|
[19:32] sustrik
|
i assume you need a confirmation that particulat message was processed
|
[19:33] sustrik
|
zedas: if that's the case i would say it's the application's responsibility to handle the signal after 0mq returns EINTR
|
[19:34] sustrik
|
zedas: or mask the signals in such a way as not to be delivered to the thread doing zmq_poll
|
[19:34] sustrik
|
Ergo: no need for ack, right?
|
[19:35] sustrik
|
then, possibly push/pull would do
|
[19:44] zedas
|
sustrik: i think it's teh damn SIGPIPE
|
[19:44] zedas
|
god i hate that signal.
|
[19:46] cremes
|
Ergo^: probably
|
[19:47] cremes
|
Ergo^: make sure you read the guide if you haven't yet; it covers several common use-cases
|
[19:48] sustrik
|
hm, SIGPIPE
|
[19:48] sustrik
|
zedas: is that Linux?
|
[19:51] zedas
|
sustrik: yes
|
[19:52] zedas
|
to both questions...but i'm doing IGN on the SIGPIPE, so no idea. is zeromq doing something different with SIGPIPE?
|
[19:52] sustrik
|
no, it's doing nothing with signals
|
[19:52] sustrik
|
however, if SIGPIPE is caused by 0mq itself
|
[19:53] sustrik
|
we should treat that as 0mq bug and fix it
|
[19:53] zedas
|
could it be happening in a zmq thread?
|
[19:53] zedas
|
i actually suspect it's something in my code not dealing withthe signal right.
|
[19:53] sustrik
|
i can imagine following scenario:
|
[19:54] sustrik
|
there's POLLOUT condition on underlying TCP socket
|
[19:54] sustrik
|
0mq decides to write to that socket
|
[19:54] sustrik
|
however, in the mean time the peer disconnects
|
[19:54] sustrik
|
so actual write produces SIGPIPE
|
[19:55] sustrik
|
hm, it's not obvious how to solve that kind of thing
|
[19:58] sustrik
|
Ergo: it looks like just a part of the example
|
[19:58] sustrik
|
zedas: checking Stevens' book
|
[20:01] sustrik
|
ergo: you need a process that binds to the ports you are connecting to
|
[20:02] sustrik
|
zedas: Stevens says SIGPIPE is raised by the *second* attempt to write to a disconnected socket
|
[20:03] sustrik
|
it's not entirely clear how it works; i have to do some more reading
|
[20:18] skm
|
i have a queue of work on 3 servers (900+ peices) that 5+ clients can handle (1 peice of work at a time) - im trying to think of the best way to split it up
|
[20:18] skm
|
my thought, servers use push clients use pull
|
[20:18] mikko
|
Ergo^: you connect both of the sockets
|
[20:18] skm
|
but when a client connects it doesnt use pull right away it first asks is there any work pending
|
[20:18] mikko
|
Ergo^: where are you connceting to?
|
[20:18] skm
|
(incase a server has a whole heap of work backed up)
|
[20:19] cremes
|
skm: makes sense so far; you'll probably want to use a few different socket patterns for each
|
[20:19] mikko
|
skm: when you say one piece of work at a time do you mean one per worker or one globally?
|
[20:19] cremes
|
piece of logic you need to solve
|
[20:19] mikko
|
skm: i suspect the former
|
[20:20] skm
|
one per worker
|
[20:20] mikko
|
Ergo^: have you got another process bound to 127.0.0.1:5557 ?
|
[20:21] cremes
|
skm: in that case you don't need to build a pipeline which is what push/pull are for
|
[20:21] cremes
|
skm: you could use xreq/xrep; it will auto-load balance across all workers
|
[20:23] skm
|
ahhk - 3 servers > 1 broker (xreq/xrep) > N worker clients
|
[20:23] skm
|
?
|
[20:26] cremes
|
skm: sure, the "broker" is the QUEUE device
|
[20:27] cremes
|
i'm assuming these servers need to receive the results of the client workers computation?
|
[20:28] skm
|
yeah they need to be aware the workers are done so they can do some finalise work
|
[20:28] mikko
|
Ergo^: the program in the paste is expected to do nothing unless the server sends something
|
[20:29] mikko
|
Ergo^: so you need to have server program bound to the port it connects to
|
[20:29] cremes
|
skm: ok, then req/rep is the right pattern
|
[20:31] mikko
|
Ergo^: you thought that the file was self-contained?
|
[20:31] mikko
|
that is the worker part
|
[20:31] mikko
|
it receives work from 'receiver' socket and returns results in 'sender' socket
|
[20:49] mikko
|
renamed
|
[20:49] mikko
|
PUSH and PULL are newer and clearer names
|
[22:11] ianbarber
|
Ergo^: your receiver needs to do bind() instead of connect()
|
[22:12] ianbarber
|
pull requests
|
[22:12] ianbarber
|
:)
|
[22:13] ianbarber
|
depends where you're copying it from though - there is nothing implicit in the socket that says what exactly needs to bind, just when using TCP *someone* has to bind the socket
|
[22:13] ianbarber
|
in the pastebin example you could bind with your interactive shell and connect with your listener
|
[22:13] ianbarber
|
would still work
|