Monkuar Posted March 10, 2012 Share Posted March 10, 2012 the difference between memory usage and bandwidth usage? I did a test with 500 rows in table, got 2.36mb memory usage, and then once without 500 rows in table, i got 2.34 (IN MBS) memory usage, can that translate into bandwidth usage? somone told me that bandwidth usage != memory usage, how so? it does effect it some doesn't it ? Quote Link to comment https://forums.phpfreaks.com/topic/258615-memory-usage-vs-bandwidth-usage/ Share on other sites More sharing options...
Psycho Posted March 10, 2012 Share Posted March 10, 2012 Those are two entirely different thing. Memory Usage is the amount of memory the computer is using to perform some tasks/operations. This can be related to the running of a PHP script on the web server, database operation on the database server, or anything process that is using memory on a computer. Bandwidth Usage relates to the transmission of data in a given time. Again, this can be many things read/write operations to a hard drive, communicating to a device via USB and network bandwidth with itself has many flavors. Now, Memory itself ALSO has bandwidth (the amount of data that can be read/written to the memory in a given time). But, with respect to a website performance memory usage and bandwidth are two different things. Quote Link to comment https://forums.phpfreaks.com/topic/258615-memory-usage-vs-bandwidth-usage/#findComment-1325688 Share on other sites More sharing options...
Monkuar Posted March 10, 2012 Author Share Posted March 10, 2012 Those are two entirely different thing. Memory Usage is the amount of memory the computer is using to perform some tasks/operations. This can be related to the running of a PHP script on the web server, database operation on the database server, or anything process that is using memory on a computer. Bandwidth Usage relates to the transmission of data in a given time. Again, this can be many things read/write operations to a hard drive, communicating to a device via USB and network bandwidth with itself has many flavors. Now, Memory itself ALSO has bandwidth (the amount of data that can be read/written to the memory in a given time). But, with respect to a website performance memory usage and bandwidth are two different things. Oh, well because I did some tests and I thought the memory usage was the same as the bandwidth usage: http://fluxbb.org/forums/viewtopic.php?pid=45146#p45146 I got owned by the developers because I thought memory usage was = bandwidth usage. Now I need to find out how to test the bandwidth on localhost with 500 rows inserted, or not. Any idea mate? Quote Link to comment https://forums.phpfreaks.com/topic/258615-memory-usage-vs-bandwidth-usage/#findComment-1325689 Share on other sites More sharing options...
trq Posted March 10, 2012 Share Posted March 10, 2012 Inserting 500 rows or 500, 000 rows would have no effect on bandwidth usage unless you are echoing each row. Bandwidth relates to the amount of data sent to the client. Quote Link to comment https://forums.phpfreaks.com/topic/258615-memory-usage-vs-bandwidth-usage/#findComment-1325692 Share on other sites More sharing options...
Psycho Posted March 10, 2012 Share Posted March 10, 2012 Now I need to find out how to test the bandwidth on localhost with 500 rows inserted, or not. That doesn't make much sense to me. If the Web server and the Database server are on the same machine, then everything is happening in the same machine and I don't think there is any bandwidth to monitor. If they are on separate machines then there would be. But, the amount of data for 500 records would probably be so small it would be difficult to even measure accurately. Quote Link to comment https://forums.phpfreaks.com/topic/258615-memory-usage-vs-bandwidth-usage/#findComment-1325693 Share on other sites More sharing options...
Monkuar Posted March 10, 2012 Author Share Posted March 10, 2012 Now I need to find out how to test the bandwidth on localhost with 500 rows inserted, or not. That doesn't make much sense to me. If the Web server and the Database server are on the same machine, then everything is happening in the same machine and I don't think there is any bandwidth to monitor. If they are on separate machines then there would be. But, the amount of data for 500 records would probably be so small it would be difficult to even measure accurately. Well these 500 records are for the online table, so im trying to represent 500 people online in a forum. (im trying to do concurrent connections, 500 of em) each connection has 8queries to select all member info and to call the forum page/etc Quote Link to comment https://forums.phpfreaks.com/topic/258615-memory-usage-vs-bandwidth-usage/#findComment-1325701 Share on other sites More sharing options...
trq Posted March 10, 2012 Share Posted March 10, 2012 Well these 500 records are for the online table, so im trying to represent 500 people online in a forum. (im trying to do concurrent connections, 500 of em) each connection has 8queries to select all member info and to call the forum page/etc What your trying to describe there sounds terribly inefficient. You should be able to select all of a users info using a single query. Quote Link to comment https://forums.phpfreaks.com/topic/258615-memory-usage-vs-bandwidth-usage/#findComment-1325714 Share on other sites More sharing options...
Psycho Posted March 10, 2012 Share Posted March 10, 2012 Well these 500 records are for the online table, so im trying to represent 500 people online in a forum. (im trying to do concurrent connections, 500 of em) each connection has 8queries to select all member info and to call the forum page/etc What your trying to describe there sounds terribly inefficient. You should be able to select all of a users info using a single query. It sounds as if he is trying to some load/performance testing by simulating 500 concurrent users accessing the same info (500 records) at the same time. The use of "500" for both the number of records and the number of users definitely adds to the confusion. Anyway, there are tools to do what you are asking. you need something to simulate the 500 users and then the ability to monitor the appropriate system resources on the server (memory & cpu usage for both the Web and DB servers, bandwidth, transaction time, etc.). I've not done any of that before, I have only participated in the evaluation of the results. Sorry. Quote Link to comment https://forums.phpfreaks.com/topic/258615-memory-usage-vs-bandwidth-usage/#findComment-1325718 Share on other sites More sharing options...
Monkuar Posted March 10, 2012 Author Share Posted March 10, 2012 Well these 500 records are for the online table, so im trying to represent 500 people online in a forum. (im trying to do concurrent connections, 500 of em) each connection has 8queries to select all member info and to call the forum page/etc What your trying to describe there sounds terribly inefficient. You should be able to select all of a users info using a single query. Turn on SMF debugging and look at the bottom i am talking about: Page created in 0.071 seconds with 7 queries. See how it says 7 queries? mine is 8 so that's what i meant, i need to have 500 people refreshing and using those queries for my test, cant figure how to do that on localhost Quote Link to comment https://forums.phpfreaks.com/topic/258615-memory-usage-vs-bandwidth-usage/#findComment-1325725 Share on other sites More sharing options...
trq Posted March 10, 2012 Share Posted March 10, 2012 i need to have 500 people refreshing and using those queries for my test, cant figure how to do that on localhost You meen you want to impersonate 500 users hitting your site? Why don't you just ask that question. Jeeze! Take a look at http://httpd.apache.org/docs/2.0/programs/ab.html Quote Link to comment https://forums.phpfreaks.com/topic/258615-memory-usage-vs-bandwidth-usage/#findComment-1325732 Share on other sites More sharing options...
Monkuar Posted March 10, 2012 Author Share Posted March 10, 2012 i need to have 500 people refreshing and using those queries for my test, cant figure how to do that on localhost You meen you want to impersonate 500 users hitting your site? Why don't you just ask that question. Jeeze! Take a look at http://httpd.apache.org/docs/2.0/programs/ab.html LOL, awesome!! This will most likely lag up my pc abit on localhost I imagine? I am going to try to do this stuff asap! Cant wait, this looks like it will be alot more beneficial then my current idea, lmao Quote Link to comment https://forums.phpfreaks.com/topic/258615-memory-usage-vs-bandwidth-usage/#findComment-1325745 Share on other sites More sharing options...
Psycho Posted March 11, 2012 Share Posted March 11, 2012 If you are running the server on the same machine that you are running the client, then your results will will be tainted from the start. Quote Link to comment https://forums.phpfreaks.com/topic/258615-memory-usage-vs-bandwidth-usage/#findComment-1326130 Share on other sites More sharing options...
xyph Posted March 11, 2012 Share Posted March 11, 2012 I don't see why it can't be done on the same machine. Apache should still serve the same amount of data. The database should use the same amount of resources as an external request. This is purely from a numerical point of view though. Please correct me if I'm wrong. Regardless, most of the OP is confusing. I'm still not entirely sure what he/she wants. Quote Link to comment https://forums.phpfreaks.com/topic/258615-memory-usage-vs-bandwidth-usage/#findComment-1326140 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.