Date | Commit message (Collapse) |
|
This allows reusing existing Linux::TCP_Info objects to avoid
generating garbage.
|
|
It makes no sense to compare peak times of different queues
(active vs queued) against each other.
|
|
When unix_listener_stats is called without arguments, it should
still match the behavior of tcp_listener_stats and return
ListenerStats object with zero values.
This allows callers to iterate through the results to find the
pathnames of all the Unix domain sockets in in listen mode.
|
|
Teach unix_listener_stats to remember the symlink path
it followed and have it point to the same object as the
resolved (real) socket path.
This allows the case where looking up stats by symlinks
works if the symlink is given to unix_listener_stats:
File.symlink("/real/path/of.sock", "/path/to/link.sock")
stats = unix_listener_stats(["/path/to/link.sock"])
stats["/path/to/link.sock"] => # same as stats["/real/path/of.sock"]
|
|
Raindrops currently fails when provided a symlink to a socket.
As this is a common practice for many deployment tools (Vlad,
etc.) this patch adds support for finding the realpath prior to
looking the socket up in /proc/net/unix
[ew: commit message subject]
[ew: fixed test to pass under 1.9.3 and 1.8.7:
* Tempfile#unlink is unsafe to call if we want to reuse the
path, use File.unlink(tmp.path) instead
* The return value of File.symlink is zero (or it raises),
so it's unusable.
* File.symlink will not call #to_path under 1.8.7, so it's
necessary to pass pathnames to it, not Tempfile objects.
]
Signed-off-by: Eric Wong <normalperson@yhbt.net>
|
|
This enables it to behave more like a Rack
BodyProxy would, delegating methods to its body
object when it does not implement them itself.
(Also includes a minor grammar fix to a comment.)
[ew: minor comment/whitespace fix]
Signed-off-by: Eric Wong <normalperson@yhbt.net>
|
|
Most other linux-specific test files have this, but
test_linux_tcp_info.rb does not.
With this patch, gmake test passes on OpenBSD.
|
|
Just in case somebody tries to scan all addresses, we
won't run out of memory as easily.
|
|
It could be useful to know when the first and last peak time of
a maximum was.
|
|
Unicorn.run no longer exists
|
|
It can be useful to some to see that info all at once
without hitting the HTML index page.
|
|
|
|
Found in the check-warnings target in pkg.mk
|
|
The last_data_recv field is dependent on the CONFIG_HZ of
the kernel, so the stock 250 HZ kernel can change the
timing on us.
|
|
Very few programs can take advantage of inheriting FDs
across exec() boundaries, and inet_diag sockets have no
reason to be used in this way.
|
|
We know exactly when to invalidate based on the delay :)
|
|
It takes too long
|
|
Apparently 1.8 Test::Unit doesn't like empty test classes
|
|
It does streaming!
|
|
This matches behavior of the TCP version.
|
|
No need to waste resources on creating/destroying
a socket.
|
|
It's not needed since we don't care to rebind sockets
|
|
No reason to have an extra method. This also speeds up
the multi-listener case for tcp_listener_stats since it
avoids expensive sendmsg() syscalls.
|
|
Be stricter about invalid inputs.
|
|
This is a work-in-progress and will probably be modified
before the next release.
|
|
"Advanced" GCs are typically less aggressive and typically allow
much more memory to be used.
|
|
Raindrops is designed to work with forking servers after all.
|
|
This allows limited resizing of the Raindrops memory
area since we always over-allocate due to the required
page aligment for mmap.
It would be nice if mremap() worked with MAP_SHARED,
but it does not and triggers a bus error when attempting
to access the new area.
ref: https://bugzilla.kernel.org/show_bug.cgi?id=8691
|
|
Oops, don't let GC close our listener before Unicorn
can inherit it.
|
|
POSIX message queues needs native threads to function.
|
|
Seems to basically work
|
|
|
|
|
|
|
|
UGH...
|
|
We need to do this for apps that depend on things like the
sendfile() optimizations in Rainbows!
|
|
This is the highest number a counter may be incremented to
before it overflows.
|
|
This returns a Raindrops::TCP_Info object
that wraps a tcp_info struct.
|
|
Since Unicorn and Rainbows! support IPv6 now, it makes sense to
support the rfc2732-style addresses it returns.
|
|
inet_diag already supports AF_INET6.
|
|
|
|
Modern glibc can easily return the L1 cache line size with
sysconf(3), so we'll use that and avoid paying a size penalty on
CPUs with smaller cache lines than 128 (every modern x86 except
the idiotic P4).
Additionally, if we detect a single CPU machine, avoid paying
any padding penalty at all.
On machines without the non-portable glibc sysconf(3)
enhancements, we'll continue to operate on the assumption
of an enormous 128 byte cache line size.
|
|
It's not pretty...
|
|
|
|
|