|
Posted by Stanislav Sobol on 09/27/05 22:57
And, I think you have to optimize your code ;-) and databases.
"Jerry Stuckle" <jstucklex@attglobal.net> ???????/???????? ? ????????
?????????: news:tOGdnZUtjbRVBqTeRVn-gQ@comcast.com...
> pierre.bru@gmail.com wrote:
>> hi,
>>
>> fist the context: I have a web server which query a mySql database. but
>> as the number of parralel queries increase, the server slows down too
>> much.
>>
>> I got 2 ideas, one of which is to run N deamons which effectively
>> execute requests. the PHP uses message queuing(1) to queue queries
>> request to the daemons. but the answer may be quite large, larger than
>> messages the message queueing service can handle.
>>
>> I thought to open back a communication link between the current daemon
>> and the waiting PHP to tranfer/process the result, using the message
>> queueing service to send back info regarding the opened link.
>>
>> I thought to open a pipe between the current daemon and the PHP. is
>> this possible? and if so, how? if not, is an IP link to localhost be as
>> fast as a pipe?
>>
>> TIA,
>> Pierre.
>>
>> (1) http://www.phpfreaks.com/phpmanual/page/function.msg-get-queue.html
>>
>
> Pierre,
>
> How is that going to help you? You're just adding another layer to an
> already slow process.
>
> First of all you need to determine why the slowdown occurs. Is it lack of
> CPU cycles? Insufficient real memory? Disk access time? Insufficient
> buffers/cache? Or any of a number of other things.
>
> Once you determine *why* the slowdown occurs, you can work on that
> problem. It may be tuning parameters, a faster CPU, multiple physical
> disks, more memory, or even another machine to run your MySQL queries.
>
> But just trying things without understanding the cause of the slowdown is
> a very hit-and-miss way of "fixing" it.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstucklex@attglobal.net
> ==================
Navigation:
[Reply to this message]
|