[PHP] Is there any considerations for not putting php scripts in tmpfs?

2009-08-10 Thread Peter Wang
Hi php-general,
sorry if it is a wrong lists for this question.

I have read many articles/messages about using tmpfs store temp files,

for example, php session data, smarty compied templates and so on.

An obvious reason for that is: it doesn't matter about data loss caused by
machine restart/poweroff.

since it is not that difficult to restore files on a tmpfs from a disk-based
dir when machine boot up.

so may i put all my php scripts on a tmpfs to speed it up?  would that cause
other issues?

thanks for your advices.


Re: [PHP] Is there any considerations for not putting php scripts in tmpfs?

2009-08-10 Thread Peter Wang
hi,thanks for your reply.



On Mon, Aug 10, 2009 at 9:54 PM, Richard Quadling
wrote:

> 2009/8/10 Peter Wang :
> > Hi php-general,
> > sorry if it is a wrong lists for this question.
> >
> > I have read many articles/messages about using tmpfs store temp files,
> >
> > for example, php session data, smarty compied templates and so on.
> >
> > An obvious reason for that is: it doesn't matter about data loss caused
> by
> > machine restart/poweroff.
> >
> > since it is not that difficult to restore files on a tmpfs from a
> disk-based
> > dir when machine boot up.
> >
> > so may i put all my php scripts on a tmpfs to speed it up?  would that
> cause
> > other issues?
> >
> > thanks for your advices.
> >
>
> Considering that in the main PHP scripts are readonly, I would have
> thought the normal file and disk caching of the OS would suffice.


normal file/disk caching of the OS works for small amount of files,
but when your apps has huge amounts of files, that doesn't work any more.
even with APC, it still cause many stat() system calls.


>
>
>
>
> --
> -
> Richard Quadling
> Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
> "Standing on the shoulders of some very clever giants!"
> ZOPA : http://uk.zopa.com/member/RQuadling
>


[PHP] is there any way to get realpath cache hit ratio of php?

2009-08-11 Thread Peter Wang
hi,

Is there any way to get realpath cache hit ratio of php?


realpath_cache_size integer

Determines the size of the realpath cache to be used by PHP. This
value should be increased on systems where PHP opens many files, to
reflect the quantity of the file operations performed.

realpath_cache_ttl integer

Duration of time (in seconds) for which to cache realpath information
for a given file or directory. For systems with rarely changing files,
consider increasing the value.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: AJAX and PHP

2008-10-04 Thread Peter Wang
"Alain Roger" <[EMAIL PROTECTED]> writes:

I think both will be ok, it just depends on what's you want:)

> HI,
>
> i'm currently working on some web application and i would like to know what
> is the best way to do what i want.
> basically like all application i have a menu and based on selected item menu
> i want to display a page (basically 50 % of this new page is DB result/grid.
>
> As usual i have 2 divs, one for the menu one for the content of DB to
> display.
> i would like to know if it's not better to use AJAX to load the content of
> the second div (DB result and other stuff) instead to every time load a new
> page which load menu and content of DB ?
>
> what are your experiences on such thing ?
> thx.
>
> -- 
> Alain
> 
> Windows XP SP3
> PostgreSQL 8.2.4 / MS SQL server 2005
> Apache 2.2.4
> PHP 5.2.4
> C# 2005-2008


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php