On Wed, Jun 2, 2010 at 6:55 PM, Zhu Han <[email protected]> wrote: > Since there is no response on it, so I re-send it. Can anybody shed some > light on it? Thank you.
Yes, sorry, I've been thinking about my reply. (As a tiny bit of background, in case there's any doubt, I usually assume that deployments of beanstalkd are configured so that they never swap. If they do swap, performance is likely to go down the toilet.) Using mmap is worth thinking about if we want to allow storing more jobs than fit in memory. Until then, I think the advantages of using mmap are too slight to worry about. Right now beanstalkd uses the binlog for only recovery. For this purpose, writing to a file descriptor is not really easier or harder than mmap. Having fewer system calls will make things a bit faster, but I think our performance is already pretty good and our time is probably better spent on bug fixing and features. Far more important for speed is maintaining sequential access to avoid disk seeks. I think having an extra copy of some jobs in the page cache makes little difference for good or bad. If we want to use the binlog as the primary store of jobs (thus letting us accept more jobs than memory can hold), we'll be both reading and writing, which can cause seeks, which will kill performance. This might be a desirable tradeoff for some, but we must make sure, if we do it at all, this doesn't cause any problems for those who don't need the extra storage space. Here's an issue for tracking and further discussion: http://github.com/kr/beanstalkd/issues/issue/42 kr -- You received this message because you are subscribed to the Google Groups "beanstalk-talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/beanstalk-talk?hl=en.
