FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Including PHP scripts on same server
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Including PHP scripts on same server [message #171916 is a reply to message #171915] Fri, 21 January 2011 03:08 Go to previous messageGo to previous message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma:
Senior Member
jwcarlton wrote:
>>> Isn't that part of what Gzip compression does automatically? Buffers
>>> out tabs, newlines, etc?
>> No, it does not. And BTW, it also takes up cpu cycles - which you seem
>> to be so overly concerned about.
>
> The CPU is rarely under strain, actually. I have a Quad Intel Xeon CPU
> 3.20GHz, and rarely have a load that's high enough to be noticed. My
> bottleneck seems to be RAM; I just upgraded to 4GB, and will need to
> upgrade to 8GB within the next few weeks.
>

That really tells the whole story; since clients are bandwidth limited,
you end up with a lot of processes..whether or not the data comes from
separate files or not is scaarcely an issue.

One way to reduce RAM usage is to create a custom shareable library in
C, and put PHP wrappers on it.

Biggish job.


> I'm also regularly tweaking the server, due to the number of
> processes. My average this week has been over 500 processes, with a
> peak of over 1100. I've never professed to know a lot about the server
> backend, and I was concerned that having 5 includes would turn in to 5
> processes per page load.
>

No. It wont. One process. Probably all of those files are in bug=fered
RAM anyway so prvided you have enough..


>
>> If you're performance is that critical, you need to be looking at
>> hardware solutions - multiple servers, for instance.
>>
>> And as Paul said - you should be using C instead of an interpreted language.
>
> A second server is on my list, but that's a big expense so I'm trying
> to push it off as long as I can with code and server config tweaks.
>

Better to get 64GB of RAM on ONE server. If CPU is not stressed and the
gigabit Ethernet is not stressed.


> When I rebuild next year, maybe I'll make a focus on working in C. It
> doesn't seem to be too different from Perl, anyway, and I coded in
> Perl for years before ever touching PHP.

Its not hard to take procedural PHP and turn it into C..if you have a
PHP library of stuff start with that and wrap it in a custom PHP library.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ElephantMark - a new simple tool for PHP documentation
Next Topic: hack
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 17:32:22 GMT 2024

Total time taken to generate the page: 0.04420 seconds