473,396 Members | 2,013 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

large data transfer between 2 processes

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/p...get-queue.html

Sep 27 '05 #1
4 1830
pi********@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/p...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.
js*******@attglobal.net
==================
Sep 27 '05 #2
pi********@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.


Not a PHP question.

MySQL doesn't do parallel queries. Queries are processed in a queue.

Your suggestion - to run more code with more layers of abstraction is more
likely to slow your machine down. Are you sure that it is purely down to
the size of the returned dataset? IME most DB performance issues can be
fixed by tweaking your schema. What does EXPLAIN say for your queries? Are
you logging slow queries?

I've never been a great fan of BLOBs in DBMS - filesystems are much more
capable of handling them.

Assuming that these avenues have been exhausted, you might think about
setting up a MySQL5 parallel cluster with partitioned data (not a
replicated cluster).

HTH

C.
Sep 27 '05 #3
And, I think you have to optimize your code ;-) and databases.

"Jerry Stuckle" <js*******@attglobal.net> ???????/???????? ? ????????
?????????: news:tO********************@comcast.com...
pi********@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/p...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.
js*******@attglobal.net
==================

Sep 27 '05 #4
> MySQL doesn't do parallel queries. Queries are processed in a queue.

oh! I didn't know that :-/

you do mean that if my web site receive let say 100 simultaneaous hits,
each one running a PHP scrit doing one or more mySQL queries, these
queries will be queued and done in sequence ?

where can find more info on this ?

BTW, the web server runs on a linux box and the DB on another box.

TIA,
Pierre.

Sep 27 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Richard Webb | last post by:
Hi all, I guess this is more of a design problem than a language problem, but I'm confused either way! I have a class and it has a private data member which is a struct. The size of the struct is...
2
by: julian_m | last post by:
Excuseme if it isn't a strictly PHP related post... I've a local database (ms access) wich has all the stock information (nearly 10000 daily-changing records), and I want to keep this info on line...
11
by: CSN | last post by:
Is it possible to iterate over an array in plpgsql? Something like: function insert_stuff (rel_ids int) .... foreach rel_ids as id insert into table (rel_id, val) values (id, 5);
1
by: Mark | last post by:
Hi, I've seen some postings on this but not exactly relating to this posting. I'm reading in a large mail message as a string. In the string is an xml attachment that I need to parse out and...
0
by: Sanjay | last post by:
I have a question whose answer will help me save a lot of time in investigation and implementation. Becuase we have a mix of platforms (Windows/Unix etc) in our environment I would like to...
2
by: jdev8080 | last post by:
We are looking at creating large XML files containing binary data (encoded as base64) and passing them to transformers that will parse and transform the data into different formats. Basically,...
2
by: WSE with SSL and large amount of data | last post by:
Hi there, What's the better strategy for uploading large files trough webservices? I can use Dime/WS-Attachments but for files with over 5MB in size, maybe I got some timeout/refuse problems in...
2
by: thirunavukarasukm | last post by:
Hai I am creating one web application i am using xml String with one containing xml Output to assign that temporary variable.. this my requirement I want to transfer one xml file to...
1
by: mariuchp | last post by:
Can somebody help me. Is it a good method to transfer large data accros network? The query returns about 1 milion rows, and I must transfer them to client application and generate .xml files....
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.