of strdup's (it used apr_table_addn, for example).
Bottom line is alot fewer system calls and allocations. It gives me a
5% increase in mod_disk_cache across the board.
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
--- mod_disk_cache.c.orig 2006-01-18 13:44:55.0 -0500
Ian Holsman wrote:
does anyone have any objections to this patch?
5% is a pretty nice gain imho.
if I don't see anything in the next couple of days I'll commit it.
me for one! I was just hoping to get some ideas flowing. This is not
meant to be for production.
--
Brian Akins
Lead
:
-copy from OS buffer (OS may copy from disk) into meta_file_t buffer
-use apr_table_setn and addn
only 1 copy and 1 apr_pcalloc (or equivalent)
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
patches being accepted as is (as are??), I
just want to provoke some thought. I'm still working from this side to
allow us to release our code, but so far nothing :(
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
what are these supposed to be?
struct cache_info {
int status;
apr_time_t date;
apr_time_t expire;
apr_time_t request_time;
apr_time_t response_time;
};
ie, what are the documented values your supposed to set/get from this?
--
Brian Akins
Lead Systems Engineer
CNN
to write
cache purgers easily. needs to be able to handle the vary info (ie,
purge all versions of /xxx.html)
-set mix/max/default expire per CacheEnable rule (maybe useful for other
options as well)
-getting the other 10% of performance would be cool too :)
Thoughts?
--
Brian Akins
Lead
Any idea of a time frame for 2.0.56? I was about to begin a large
upgrade to 2.0.55 and don't want to finish it the day before 2.0.56
comes out :)
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
This is going to get blasted, I know. This greatly simplifies
ap_cache_check_freshness when we ignore cache control headers...
I primarily use cache in a reverse proxy situation with an app/origin
server in my control behind it. I do not care what freshness rules the
clients want me to
handle this
error and complain.
Also, if we stored the data length in the headers file and did not write
out the headers until the body, we could save s system call on every
cache hit...
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
--- mod_disk_cache.c.orig 2006-01-18 13
This eliminates the call to apr_file_get_info on the data fd in
mod_disk_cache. It reorders how store_headers works a bit and writes
the length of data file to end of headers file. Not a huge deal on some
systems, but it does eliminate a (potential) system call (fstat).
--
Brian Akins
Lead
directive,
provide the actual physical port number being used by this request as a
potential port.
Is there some punctuation missing here or am I having a bad day?
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
Never mind. I re-read and re-read the doc until I figured it out.
Still seems that this needs to be clarified somewhat.
Brian Akins wrote:
The docs for UseCanonicalPhysicalPort says:
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
as much as possible to the backends?
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
/blarf.gif is requested; this should not
be sent to the just kept-alive server, but instead to
foo2...
I see now.
Does this apply even when using balancer? I mean, do we break the keep
alive to backend? We should need to...
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
.).
we're wasting sockets.
we'd be saving start up time on each socket.
So just to be clear, there is no connection pooling in proxy_balancer,
or is there? Did I imagine that it was supposed to be?
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
Jim Jagielski wrote:
I'm currently trying to trace through exactly how the code is trying
to pool connections.
If someone produces a good patch, I have some traffic I can throw at it :)
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
if there was a way to just get back a
bucket brigade from it, or something similar.
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
This adds an optional function that one could use to get basic hit/miss
stats from mod_cache. Right now it just does hit or miss, could pass an
HTTP status code for various status (stale, error, etc.).
Default function does nothing.
--
Brian Akins
Lead Systems Engineer
CNN Internet
with this, like log in database...*/
}
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
diff -ru httpd-2.2.0.orig/modules/cache/cache_util.c
httpd-2.2.0/modules/cache/cache_util.c
--- httpd-2.2.0.orig/modules/cache/cache_util.c 2005-11-10 10:20:05.0
-0500
+++ httpd-2.2.0
If I run httpd -k stop, if it cannot stop listener, it still returns 0.
same for graceful-stop. should it return something else?
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
Garrett Rooney wrote:
[snip]
Also, we tend to run most of our fastcgi's using a domain socket. I'm
sure others do that as well.
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
Jim Jagielski wrote:
So it seems to me that some sort of Balancer member
option that determines whether or not the connection
is persistent or not would alleviate some of
the issues you raise.
Also, if the persistent connections we actually persistent... Is this
fixed in trunk?
--
Brian
so that it checks disk first, then memcached. Have it
store stuff in memcached.
It is much faster to serve from disk than the network.
This is very similar to how squid does it.
We discussed this on IRC a couple weeks ago.
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
Justin Erenkrantz wrote:
mod_disk_cache should work over NFS. =) -- justin
NO!!! ;)
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
Xuekun Hu wrote:
(gdb) bt full
see which thread actually killed it:
(gdb) thread apply all bt 10
gives you first 10 lines of backtrace for each thread. Find which one
got kill()'ed. then:
(gdb) thread number
(gdb) bt
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
About to do a deployment and I'd rather use 2.2.1 than my patched 2.2.0
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
official.
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
UseCanonicalScheme On
What do you, the httpd dev community, think of:
1) the concept?
+1
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
://fill
BalancerMember http://server1:80 route=server1
BalancerMember http://server2:80 route=server2
/Proxy
VirtualHost *
...
ProxyPass /path balancer://fill/ stickysession=Sticky
/VirtualHost
I want to be able to use same balancer in multiple vhosts.
--
Brian Akins
got bounced?
Original Message
Subject: Bug in proxy_balancer?
Date: Tue, 21 Mar 2006 14:18:07 -0500
From: Brian Akins [EMAIL PROTECTED]
To: dev@httpd.apache.org
This works:
VirtualHost *
...
Proxy balancer://fill
BalancerMember http://server1:80 route=server1
Jim Jagielski wrote:
Would that match what you're looking for?
Yes. Wasn't sure how to word it. The issue is, I think, that add_pass
gets ran before megre.
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
is the correct balancer.
Any reason we can't have the limitation that balancer names must be unique?
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
Jim Jagielski wrote:
When each Vhost is merged, they
grab a copy of the main server's balancer config setup.
So you have 2 balancers, one of which isn't used at
all (the main server's) and one that is.
my very silly global_balancers patch fixes that.
--
Brian Akins
Lead Systems Engineer
I confused my self...
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
I just noticed in mod_disk_cache that we don't check the return value of
apr_bucket_read in store_body.
bakins: Isn't that a bad thing?
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
--- mod_deflate.c~ 2005-11-10 10:20:05.0 -0500
+++ mod_deflate.c 2006-03-28 14:04:20.0 -0500
@@ -518,7 +518,10 @@
}
/* read */
-apr_bucket_read(e, data, len, APR_BLOCK_READ
Sent the wrong one.
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
--- mod_deflate.c~ 2005-11-10 10:20:05.0 -0500
+++ mod_deflate.c 2006-03-28 14:07:32.0 -0500
@@ -401,7 +401,8 @@
apr_bucket *b;
apr_size_t len;
int done = 0
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
--- mod_disk_cache.c~ 2005-11-17 08:39:15.0 -0500
+++ mod_disk_cache.c2006-03-28 14:10:37.0 -0500
@@ -984,7 +984,11 @@
{
const char *str;
apr_size_t length, written
Jim Jagielski wrote:
There are some proposed proxy backports that are lacking one additional
+1 to be folded in. Would be nice to have those in 2.2.1 :)
+1 to that.
Can I vote? Which patches do I need to vote on?
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
Brian J. France wrote:
r-main will be NULL, but r-prev is valid for internal redirects. This
was talked about on IRC and Brian Akins mentioned creating a
ap_is_subrequest call:
#define ap_is_subrequest(r) (r-main != NULL)
I think we decided against that and just have mod_deflate changed
it's getting bubbled up..
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
Plüm wrote:
Proxy sents up an error_bucket with HTTP_BAD_GATEWAY if the connection
to the backend broke in the middle.
So should every modules that reads the brigade check for an error
bucket? It does not appear that any of the cache modules do that.
--
Brian Akins
Lead Systems Engineer
to determine, that I can
tell, that the proxy response is invalid.
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
Brian Akins wrote:
If it's not in 2.2.0, that may explain my issues...
It's in 2.2.1.
It would help if when answering such questions that we mention what
branch it is in.
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
*:25
ServerName smtp://mail.example.com:25
/vh
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
);
/*
other stuff, like get, replace, etc.
*/
} cache_provider_t;
Just thinking out loud.
Also, mod_cache should be renamed mod_http_cache
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
.
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
Garrett Rooney wrote:
To really benchmark it's going
to require more stuff than your average college student has lying
around the house.
Simple dual opteron with GigE networking is more than sufficient. I can
mentor by testing some changes if somebody needs it.
--
Brian Akins
Lead
test a bunch of stuff
here. It's very hard to saturate a GigE when serving 1 byte files.
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
to write and mod_http_cache
could handle all the nastiness with http specific stuff (Vary, etc.)
My biggest mental block is how to have the configuration for this not be
absolutely horrific.
Thoughts?
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
mod_cache can be used as either. I am talking
of a completely general purpose cache. It doesn't care if it's http
pages, ip's or what. an http_cache would be as trivial to implement
as porting current mod_cache to use generalized cache.
--
Brian Akins
Lead Systems Engineer
CNN Internet
have a working
prototype now.
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
can help in some way as well. I have a working
prototype now.
--Brian Akins
Lead Systems Engineer
CNN Internet Technologies
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
all the mod_proxy
bugs...
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
Graham Leggett wrote:
Brian Akins wrote:
Was playing with memcached and mod_cache when I had some thoughts.
-mod_cache should be renamed to mod_http_cache
-new modules mod_cache (or some inventive) name would be a more
general purpose cache)
I would say that mod_cache would need
- having only thought about it for 10 seconds..
Any particular reason your backends are slow?
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
As most things are now in hooks, why not make virtual host selection a
hook as well? I have a few really strange setups that would be alot
easier to configure if I could override how the virtual host is selected.
Thoughts?
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
a blob of data
close(object)
Thoughts? I'm sure we may need more/better cache provider functions.
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
Brian Akins wrote:
mod_cache: a generic caching module - provides glue between providers
The more I think about it, this part doesn't even need to be httpd
specific. It could be apr_cache. Not sure how that would scre things
up. I also noticed that the whole providers thing is httpd
to configure this.
WDYT?
Yes. that should be configurable.
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
: Vary on x,y,z
-second entry is headers for new key (generated with the vary info)
-third entry is the actual data
As far as mod_cache is concerned these are 3 independent entries, but
mod_http_cache knows how to stitch them together.
mod_cache should *not* be HTTP specific in any way.
--
Brian
.
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
rsync these images to the
front end server? Even the best code can be killed by a bad architecture ;)
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
independent entries.
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
Davi Arnaut wrote:
mod_cache needs only to cache key/value pairs. The key/value format is up to
the mod_cache user.
correct.
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
mod_http_cache returns headers and data to client.
Notice there is a pattern to this...
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
be a failback for the local
cache as well without mucking up all the proxy and cache code.
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
Graham Leggett wrote:
the independent caching of variants.
The example I posted should address this issue.
I also have some ideas concerning the thundering herd problem, it's just
a matter if you think it should be handled in cache or http_cache.
--
Brian Akins
Lead Systems Engineer
CNN
).
what if mod_http_cache had a way to record it's cached objects? It
could keep up with the relationships there. Basically, you have a
provider that has a few functions that get called whenever
mod_http_cache caches or expires an object.
--
Brian Akins
Lead Systems Engineer
CNN Internet
other variants may be valid/in cache.
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
once the page is fetched
complete.
in the case of mod_disk_cache the way I would do it is to have a
deterministic tempfile rather than user apr_tempfile and opening it EXCL.
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
Graham Leggett wrote:
- the cache says cool, will send my copy upstream. Oops, where has my
data gone?.
So, the cache says, okay must get content the old fashioned way (proxy,
filesystem, magic fairies, etc.).
Where's the issue?
--
Brian Akins
Lead Systems Engineer
CNN Internet
a
revalidate for the generic cache it should address all your concerns. ???
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
trying to read from it will eventually get an error).
agreed. new mod_cache should handle this.
Certainly separate the protocol from the physical cache, just make sure
the physical cache delivers the shopping list above :)
Most seem like protocol specific stuff.
--
Brian Akins
Lead Systems
filtering, and so on), or what ever.
In my experience, this always sounds good in theory, but just doesn't
ever work in the real world. The event mpm is sorta a step in that
direction, but seems to keep the balance pretty good.
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
doing keepalives, for example.
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
Graham Leggett wrote:
Moving towards and keeping with the above goals is a far higher priority
than simplifying the generic backend cache interface.
This response was a perfect summation of why we do *not* run the stock
mod_cache here...
--
Brian Akins
Lead Systems Engineer
CNN Internet
it
as it is currently?
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
still mulling it over - that a generic cache
architecture would get in the way of making a fully functional http cache.
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
it to a more suitable name.
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
of the issues in the current mod_cache.
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
Is anyone else interested in having a generic cache architecture? (not
http). I have plenty of cases were I re-invent the wheel for caching
various things (IP's, sessions, whatever, etc.). It would be nice to
have a provider based architecture for such things.
--
Brian Akins
Lead Systems
Gonzalo Arana wrote:
I am. How about adding it to apr?
How about someone figuring out how to get providers into apr? Doesn't
look horribly hard. Perhaps I should ask on apr-devel?
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
with current mod_cache. I just think it
should be either: renamed or made generic. We may or may not need a
generic mod_backend_cache. I have posted a psuedo-implementation that
got lost in the latest thread bloat. I can repost if anyone is interested.
--
Brian Akins
Lead Systems Engineer
CNN
be a memcache frontend,
or something completely different.
Trust me, I am extremely concerned about performance.
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
the manager
using this interface. The manager may or may not be tied to the storage
provider. We may have enough generic interfaces already to allow
completely stand alone cache managers.
At least, that's how I would do it...
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
APR_OPTIONAL_FN_TYPE(ap_proxy_lb_workers)
*proxy_lb_workers;
-struct ap_sb_handle_t {
-int child_num;
-int thread_num;
-};
-
static int server_limit, thread_limit, lb_limit;
static apr_size_t scoreboard_size;
--
Brian Akins
Lead Systems Engineer
CNN
Any reason why we do this check alot in mod_mime.c:
r-proxyreq == PROXYREQ_NONE
why can't we add by type to proxy requests? This is at top:
/* X - fix me - See note with NOT_PROXY
*/
but I don't see a note.
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
response Content-Type text/html user-agent-vary=1
Header append Vary User-Agent env=user-agent-vary
With this patch, the correct vary headers are added in a reverse proxy
situation.
most of the code was adapted from mod_headers.
Thoughts?
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
Here's a newer version with some special handling for content-type. In
response headers, we need to match r-content_type rather than the header.
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
--- mod_setenvif.c.bak 2006-05-23 10:08:56.0 -0400
+++ mod_setenvif.c
:
ap_set_content_type(r, text/plain);
and in ap_set_content_type we call ap_add_output_filters_by_type(r);
so, even though we change the content type, we still have added DEFLATE
for this.
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
or
something...
CacheEnable disk2 /
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
Niklas Edmundsson wrote:
This patch takes advantage of the possibility to do the size-check of
the file to be cached early.
obj-vobj = dobj = apr_pcalloc(r-pool, sizeof(*dobj));
Shouldn't this be in mod_cache so that all providers do not have to
duplicate this logic?
--
Brian Akins
-headers_out,
Content-type) would be null, but content_type would be set.
See the patch I posted a few days ago.
+1 in concept
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
Francois Pesce wrote:
These patches may fix the r-content_type behaviour. Are you OK with it ?
+1
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
)) { /* notfound */
+cfg-flags |= (RULEFLAG_STATUS | RULEFLAG_NOSUB);
+cfg-forced_responsecode = HTTP_NOT_FOUND;
+}
else {
++error;
}
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
the
URL and return it to the client - to translate ``/~'' into ``/u/'', or
to always append a slash to /u/user, etc.
So do the docs need to be updated to say: return arbitrary http code?
BTW, this does work. patch withdrawn. somebody needs to fix docs...
--
Brian Akins
Lead Systems Engineer
CNN
Anyone else care to vote on this so it can get, possibly, committed?
Francois Pesce wrote:
These patches may fix the r-content_type behaviour. Are you OK with it ?
--
*Francois Pesce*
2006/5/31, Brian Akins [EMAIL PROTECTED]:
Francois PESCE wrote:
I've discussed about a patch
in handy. It is
however very ugly.
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies
type module with a relatively
simple API to add and access per worker memory. I have some ideas if
anyone wants to hear them...
--
Brian Akins
Chief Operations Engineer
Turner Digital Media Technologies
201 - 300 of 456 matches
Mail list logo