Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-09-10 04:17:22

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 453
Website

How can I reduce the heavy server requirements from css.php?

I am hosting on a grid server at Media Temple. Recently my GPU overage is going through the roof (over 200 USD last month).

I checked my GPU for a particularly busy day last month and found it is especially high for japanesestreets.com/css.php:

Method | HTTP response | Hits | %of total | GPUs
GET | 304 | 17937 | 8.72% | 9.7195
GET | 200 | 17545 | 8.57% | 9.5565

My questions:

1. Why both a 304 and 200 HTTP response?
2. Any suggestions on how I can reduce the GPU load produced by css.php?


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#2 2010-09-10 06:09:22

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,376
Website GitHub Mastodon

Re: How can I reduce the heavy server requirements from css.php?

ad 1.

  • 304 replies appear when a client requests a resource which has not been modified since their last visit
  • 200 replies appear for “new” requests which we haven’t seen before

ad 2. Use rvm_css

Offline

#3 2010-09-10 06:42:18

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 453
Website

Re: How can I reduce the heavy server requirements from css.php?

Thanks, Robert, for the quick response and excellent advice.

I have immediately installed rvm_css and will carefully monitor server stats. Hopefully this will do the trick and cut down on the overages.


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#4 2010-09-11 13:09:06

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

Re: How can I reduce the heavy server requirements from css.php?

You may also host the CSS in a static file like you would do it with every static site.


Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML

Offline

#5 2010-09-11 13:26:01

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 453
Website

Re: How can I reduce the heavy server requirements from css.php?

merz1 wrote:

You may also host the CSS in a static file like you would do it with every static site.

Thanks. That’s actually what rvm_css (recommended above by wet) does. It automatically creates static css files, just by clicking save in the style page. Pretty cool!


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

#6 2010-09-11 13:49:10

Kjeld
Member
From: Tokyo, Japan
Registered: 2005-02-05
Posts: 453
Website

Re: How can I reduce the heavy server requirements from css.php?

@Wet: Thanks again. My css sheets now use only about 0.04 GPU’s per day instead of the 19.276 they used previously. The load on my server has been reduced tremendously.

You can calculate what kind of improvement this is. It is huge!

To all who read this, I highly recommend using rvm_css.


Old Photos of Japan – Japan in the 1850s~1960s (100% txp)
MeijiShowa – Stock photos of Japan in the 1850s~1960s (100% txp)
JapaneseStreets.com – Japanese street fashion (mostly txp)

Offline

Board footer

Powered by FluxBB