PDA

View Full Version : Do you have to worry about memory usage on your host?



Magic2K2
August 1st, 2001, 07:07
I just thought of this last night. Now, I'm no expert on bandwidth or hosting by any means, but let's say you have short, memory-intense blocks of code (PHP, for example). Maybe the code runs through inefficient loops or is a really long query. The way I see it, you aren't taking up any of your space and I don't think you are using extra bandwidth either. So, other than the speed you'll be costing your site, is it really a problem if you have some slow queries or sorting functions or something? I hope that made sense.

besta
August 1st, 2001, 07:34
If your script is overloading the server( eating up a lot of CPU resources). Then you are very likely to get your hosting account suspended.

Magic2K2
August 1st, 2001, 08:11
I wasn't planning on overloading the server. Just deciding if I should use a few sort functions.

niv
August 1st, 2001, 08:17
most hosts have more than 256 MB RAM. unless you're doing something really insanely inefficient that takes up more than most accounts, you won't get kicked out.

Chicken
August 1st, 2001, 08:18
Originally posted by Magic2K2
Maybe the code runs through inefficient loops or is a really long query. The way I see it, you aren't taking up any of your space and I don't think you are using extra bandwidth either. So, other than the speed you'll be costing your site, is it really a problem if you have some slow queries or sorting functions or something? I hope that made sense.

By running inefficient scripts, you will be overloading the server. By overloading the server, your account will be disabled. Generally you are allowed 10-20% of the resources of the machine, which is actually pretty generous.

Magic2K2
August 1st, 2001, 08:26
Everybody's getting the wrong idea. I AM NOT planning on overloading a server. Check my post in PHP/ASP help about ordering by field1 / field2 for what I'm trying to do. I just like to be very efficient ALWAYS so I'm asking this question just because I may be using some of my own sorts soon. I doubt it's any more inefficient than the search function on this board.

niv
August 1st, 2001, 08:28
Originally posted by Magic2K2
I doubt it's any more inefficient than the search function on this board.

:rolleyes:

Chicken
August 1st, 2001, 21:20
Originally posted by Magic2K2
...let's say you have short, memory-intense blocks of code (PHP, for example). Maybe the code runs through inefficient loops or is a really long query

Ok, maybe we *are* getting the wrong idea (entirely possible) but you gave us the idea in the first place :D I've requoted you above and highlighted what gave me the idea...


So, other than the speed you'll be costing your site, is it really a problem if you have some slow queries or sorting functions or something?

Maybe your intent isn't to overload the server, but to answer your question... YES it *could* be a problem.