Jump to content
  • When you click on links to various merchants on this site and make a purchase, this can result in this site earning a commission. Affiliate programs and affiliations include, but are not limited to, the eBay Partner Network.

we have more memory


Recommended Posts

If you guys arent doing any caching I would highly recommend it. We see have seen vast improvements while using EhCache wiht Hibernate. You could easily cache the last few hundred posts and reduce load on mySql 10-fold.

For mySimon.com we are keeping a cache for 30 minutes for all the editor generated content (blogs) which literally reduces the traffic to a few queries per half hour (sometimes I have seen multiple hits at high load due to cache refreshing I think?).

forum-sig.gif
Link to comment
Share on other sites

  • Replies 30
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

If you guys arent doing any caching I would highly recommend it. We see have seen vast improvements while using EhCache wiht Hibernate. You could easily cache the last few hundred posts and reduce load on mySql 10-fold.

For mySimon.com we are keeping a cache for 30 minutes for all the editor generated content (blogs) which literally reduces the traffic to a few queries per half hour (sometimes I have seen multiple hits at high load due to cache refreshing I think?).

thats some interesting stuff.

Just reading

http://ehcache.sourceforge.net/documentation/hibernate.html

This seems like a jre deal ya? I don't see how to integrate that into the php-mysql end of things on this system -- but since I'm mostly clueless thats not surprising :)

This site uses pretty bog standard php mysql queries .. it isn't clear how you could get ehcache + hibernate to work without rewriting the data methods for the whole thing.

Steve K has a beta site thats up so we could play around with some funky stuff without impacting the main site so it'd be worth checking out.

Got any docs or links about how to implement the cache ? I'm searching too.

I'm also curious about how to cache queries when the database tables are updated so often.. like if one person inserts a new post all the cached queries would be outdated. I'm sure the folk who write query caching have that one figured out but just wondering how that is handled.

cheers mate -- something new to me !

-zachary

Link to comment
Share on other sites

Yes EhCache is a specific to Java, but PHP has lots of caching ability. EhChache works by caching an object in memory at the time it is first queried. In this use case I would be caching individual posting, not the entire thread. The thread is just a collection of postings. Then what I can do is set the time-to-live on those objects. Even making the time to live 1 minute can greatly reduce load on a database.

Other groups at my company also SQUID cache. This can run side-by-side with an Apache daemon, but preferably run a separate machine. It can even sit between the Apache box and the mySql box to cache queries. Its dumb, cheap, and extremely reliable (like my 2002 ;). Less moving parts.

forum-sig.gif
Link to comment
Share on other sites

woot!!

its holloween.. there's always one zombie!!

it was there just for a sec while I did the screen grab.

Steves controlling my.conf looks pretty groovy to me.

join_buffer_size=1M

key_buffer_size=50M

max_allowed_packet=128M

max_connections=500

max_connect_errors=10000

open_files_limit=65536

read_buffer_size=1M

sort_buffer_size=1M

table_cache=500

thread_cache_size=20

wait_timeout=200

long_query_time=5

Might be time to up the key_buffer_size since the new memory ..

sorry steve for exposing the guts.. its like letting someone look in your engine uninvited.

i'll quit

Looks good, and yeah, i thought that zombie was quite fitting.

up the buffer size, considering that your ram usage is pretty good. Probably want to MRTG it or something just to get an idea of usage over time though

Link to comment
Share on other sites

We've had good luck with eaccelerator.

http://eaccelerator.net/

I'd start with trying to improve the php performance.

now that looks like something taisty that could be bolted on and tested for the beta site. Keeping compiled scripts in memeory and executing from there might make a huge difference -- especially since steve put in some extra memeory.

The main overhead was in the database before -- mostly keeping all those archived messages in active searches I think was the issue -- that and all the connections from an enthusiastic 2002 crowd!

Link to comment
Share on other sites

See now I am going to have to crack a PHP joke ;). Java make take more overhead but performs ten times better once its running! The best I have seen PHP do is server 2-3 pages a second without caching! That in unacceptable in a production environment.

I couldnt help myself. Im a nerd who has to prove his l33tness on forums. It makes me feel superior to others whom I dont even know ;)

forum-sig.gif
Link to comment
Share on other sites

In our case php is fine due to the fact that we have to wait for other servers across the internet to actually give us a response and send us back data. We are happy with a page load of under a second.

This thread is too funny... maybe we need an off topic nerdfest.. At least we are not discussing the Linux/FreeBSD whatever distribution wars...

-Justin
--
'76 02 (USA), '05 Toyota Alphard (Tokyo) - http://www.bmw2002.net

Link to comment
Share on other sites

See now I am going to have to crack a PHP joke ;). Java make take more overhead but performs ten times better once its running! The best I have seen PHP do is server 2-3 pages a second without caching! That in unacceptable in a production environment.

I couldnt help myself. Im a nerd who has to prove his l33tness on forums. It makes me feel superior to others whom I dont even know ;)

Java nerds are pretty impreesive I gotta say. I'm just an old perl hacker for the most part. Php syntax is similar enough that I can usually figure out whats going on.

Link to comment
Share on other sites

I forgot to mention, about a year ago I lab tested my application (mySimon.com), and on a RedHat EL4 64-bit box with 16gigs of RAM I was getting around 100 requests per second!

I gotta say that mysimon.com loads pretty fast and is very usable even on my crappy assed modem connecting at 21.6 kbps!!

Nice job.. never used it before.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • BMW Neue Klasse - a birth of a Sports Sedan

    BMW Neue Klasse - a birth of a Sports Sedan

    Unveiling of the Neue Klasse Unveiled in 1961, BMW 1500 sedan was a revolutionary concept at the outset of the '60s. No tail fins or chrome fountains. Instead, what you got was understated and elegant, in a modern sense, exciting to drive as nearly any sports car, and yet still comfortable for four.   The elegant little sedan was an instant sensation. In the 1500, BMW not only found the long-term solution to its dire business straits but, more importantly, created an entirely new
    History of the BMW 2002 and the 02 Series

    History of the BMW 2002 and the 02 Series

    In 1966, BMW was practically unknown in the US unless you were a touring motorcycle enthusiast or had seen an Isetta given away on a quiz show.  BMW’s sales in the US that year were just 1253 cars.  Then BMW 1600-2 came to America’s shores, tripling US sales to 4564 the following year, boosted by favorable articles in the Buff Books. Car and Driver called it “the best $2500 sedan anywhere.”  Road & Track’s road test was equally enthusiastic.  Then, BMW took a cue from American manufacturers,
    The BMW 2002 Production Run

    The BMW 2002 Production Run

    BMW 02 series are like the original Volkswagen Beetles in one way (besides both being German classic cars)—throughout their long production, they all essentially look alike—at least to the uninitiated:  small, boxy, rear-wheel drive, two-door sedan.  Aficionados know better.   Not only were there three other body styles—none, unfortunately, exported to the US—but there were some significant visual and mechanical changes over their eleven-year production run.   I’ve extracted t

  • Upcoming Events

  • Supporting Vendors

×
×
  • Create New...