This question keeps bugging me: Which type of access is the costliest (pl also mention the order, from inc to dec) - Network access, IO access or DB access?
How do we determine that?
-KK
-
Which is more costly - Network/IO/DB access (7 messages)
- Posted by: K K
- Posted on: November 10 2004 10:53 EST
Threaded Messages (7)
- Which is more costly - Network/IO/DB access by K K on November 11 2004 12:12 EST
- Which is more costly - Network/IO/DB access by Simon Knott on November 12 2004 10:55 EST
-
Which is more costly - Network/IO/DB access by K K on November 12 2004 02:01 EST
-
Which is more costly - Network/IO/DB access by Per Joergensen on November 13 2004 08:02 EST
- Which is more costly - Network/IO/DB access by Barre Dijkstra on November 17 2004 06:41 EST
-
Which is more costly - Network/IO/DB access by Per Joergensen on November 13 2004 08:02 EST
-
Which is more costly - Network/IO/DB access by K K on November 12 2004 02:01 EST
- Which is more costly - Network/IO/DB access by Simon Knott on November 12 2004 10:55 EST
- Which is more costly - Network/IO/DB access by Artem Yegorov on November 17 2004 16:32 EST
- Hard disk can be costlier than network... by Sulla Felix on September 17 2005 15:12 EDT
-
Which is more costly - Network/IO/DB access[ Go to top ]
- Posted by: K K
- Posted on: November 11 2004 12:12 EST
- in response to K K
Please respond to this... -
Which is more costly - Network/IO/DB access[ Go to top ]
- Posted by: Simon Knott
- Posted on: November 12 2004 10:55 EST
- in response to K K
It really depends on what your system is doing.
If you're application is making lots of round trips from the application to the db, and transferring a lot of data, then the network traffic could be the costliest, but I would say that this is rarely the bottleneck in a system.
If you are running very complex queries against the db, you have a large number of queries or your db just contains a shed-load of data, then the db might be the costliest. In my experience the db can cause the most problems.
Another thing to consider is the JVM of the application itself - if you have a high throughput of users, then garbage collection can become an issue as well.
As for IO, do you mean disk or another type of IO? -
Which is more costly - Network/IO/DB access[ Go to top ]
- Posted by: K K
- Posted on: November 12 2004 14:01 EST
- in response to Simon Knott
Thanks for the reply.
For the IO, I meant disk IO.
I want to discuss it a bit further. Consider the following scenario:
We have 2 computers across a network (intranet), say Computers A and B. Our program is running on A and tries to access a file. The file can be either on A or B. The system is set up in such a way that if the file is not found in A, it'll try to access it from B. Now consider these 2 cases:
Case-1: File is found in A (not in cache, but is there in the disk). So, the acess time is, lets say, D ms.
Case-2: File is not in A, but is in B's cache. So, the access time is N ms. (N for Network)
Now which one is greater, N or D?
We can apply the same scenario with DataBase as well. Database is on computer A. If the file is not in DB, we'll look for it in computer B.
Case-1: File found in DB, so access time is DB ms.
Case-2: File not in DB, but present in B's cache. So, the access time is N.
Which one is greater: N or DB?
Will the conclusion differ it is internet as opposed to intranet? -
Which is more costly - Network/IO/DB access[ Go to top ]
- Posted by: Per Joergensen
- Posted on: November 13 2004 08:02 EST
- in response to K K
Hallo
General speaking you can say the following about "ressource" access;
First is fastest;
1) Memory
2) Disk
3) Network
Still general speaking a conclusion on you db/IO/Net question, would be that your database access is properly faster then then plain disk IO access, this is because the database will try to optimize IO (maybe caching in memory), and the network is a lot slower.
As I say this is general speaking because the behaviour of the actual running system is dependent on a lot of runtime factors, and of course on the hardware you are using. (network traffic can be very fast using optical fiber cabels)
Hope this answer helps.
/Per -
Which is more costly - Network/IO/DB access[ Go to top ]
- Posted by: Barre Dijkstra
- Posted on: November 17 2004 06:41 EST
- in response to Per Joergensen
The only way to know for sure for your specific situation is meassuring it.
Write proof of concepts, profile them, voila, instant answer. -
Which is more costly - Network/IO/DB access[ Go to top ]
- Posted by: Artem Yegorov
- Posted on: November 17 2004 16:32 EST
- in response to K K
Interesting question, so consider this:
DB is both Network and IO and usually is the costliest of the solutions. Network will follow and Local IO will be the least costly.
Regards,
Artem D. Yegorov
http://www.activexml.org -
Hard disk can be costlier than network...[ Go to top ]
- Posted by: Sulla Felix
- Posted on: September 17 2005 15:12 EDT
- in response to Artem Yegorov
If you are accessing random data, each seek will cost a bit less than 10ms that'll limit you to 100 query per second per disk. You can use more disks and raid stripping... or more servers.