GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   TGP-MGP OWNERS Using Multi-Catagory Gallery Scripts Please Contact me. (https://gfy.com/showthread.php?t=329749)

Matthew 07-26-2004 04:02 AM

toddler:

take it easy, this is not my script.

my script has nothing to do with perl.

so no, I'm just hinting the ways on how to solve it.

V_RocKs 07-26-2004 04:03 AM

Quote:

Originally posted by Matthew
okay,

I'm the guy behind tmanager, and I'll try to explain what do I think about it.


First, if done right, 2nd apache for thumbs help a lot. Also a slight FreeBSD kernel tuning never hurted anyone :Graucho


Why? Correctly compiled and configured 2nd apache will consume LESS memory, which is what this server needs!

But this won't solve the whole problem. The problem is that perl script consumes a lot of memory while checking links. I think there is a memory leak somewhere in it because it shouldn't take 100 MB of RAM to check links.

And of course it's good to get a faster server anyway. Then you have the space to grow.

Also I'm suprised that guys still suggest "use c++ script only". You guys should check out how much time does launching a process via CGI takes. really. But don't start a flame war again about php and C. This is not the point I'm trying to make.

The point is, that in this particular case, the load occurs because

1) server runs this perl script, this consumes memory.
2) server goes into swap, starting a chain reaction. More and more processes have to wait for memory/CPU time to become available.
3) over a time, server processes those requests and becomes available just till next cronjob.


Hmmm... thinking about what you said... Perl scripts don't act on memory directly like C or C++ so memory leaks is kinda a moot point, unless you simply mean it doesn't clear a buffer after using certain data or close of file it has opened and stored into a handler.

If the script worked on smaller chunks of data (used a smaller buffer or worked on chuncks of 2000 links at a time) it might give you better performance system resource wise but it will take a significant ammount of more time to run.

V_RocKs 07-26-2004 04:05 AM

Quote:

Originally posted by toddler
so...you're saying due to inefficiencies in your perl code, your customers need to spend money on hardware to compensate?

I'd like to take a look at the actual code in question. Is the script parsable, or has it been made a binary?(perl2exe, whateve).

Damn your sig really says it all... hehe

Fabuleux 07-26-2004 07:09 AM

If your traffic is dropping, reboot your box now and it will be fast for at least a few days :2 cents:

Blackrose 07-26-2004 07:30 AM

looks like the problem has caused you more problem than what we have speculated ... 200k down to 50k is a total wreck :(

i really think having another server up to split up the load wouldnt hurt ya :winkwink:

XP 07-26-2004 11:16 AM

Well your links out stall. I can see it just by clicking on your sites it takes some 5-6 seconds just to process to go to gallery. For a tgp this is a huge hit. Seems the load is not from Perl but they are they are %80 apache proccess
mostly ucj, tmanager out etc. Not the perl script.

XP 07-27-2004 10:40 AM

I noticed memory management in Perl is awful... There was really memory leaks in old versions and newest version of my script (that boneprone uses)

memory leaks are nothing, for small databases, but boneprone using it since 1+ years and database files are huge (no purging for old galleries)

I optimized code for memory leaks, uses %50 less ram now. Damn, why should I take care of variables? they should be handled by virtual machine?!

Anyway, problem is solved temporarly now. New version uses heavy mysql operations (like building pages from 700K galleries database), it requires more cpu and less ram.

Owners of script on boneprone.com should contact me as soon as possible, we need upgrade them to latest version asap

boneprone 07-27-2004 10:46 AM

Thanks bud!

My sites are so dependent on your scripts, and when consultants reconmended I not use it, they did not understand that it was not an option. This script is a must for me.

But you mentioned I still need more CPU? CPU is something i didnt have much of to begin with. Are you saying I need more now with this update? Or just in general I need more?

Does this new version use more CPU?

XP 07-27-2004 10:53 AM

Yes, but getting more cpu or a server that has more CPU than you currently have is quite easy to do now days, and in fact the industry standard for your kind of site is is that of a Server with more CPU as you can see from the posts here on GFY alone by other webmasters in your same niche. "If you cant spring for a dual like what most have, at least get a processor with hyperthreading

rowan 07-27-2004 11:06 AM

Here's another thumbs up for a second, custom httpd process. A few years ago one of my sites had some severe overload problems, compiling a "lean and mean" Apache with most modules stripped out (including many of the default ones) for serving IMAGES ONLY made a huge difference in server load. It will also make a difference in your memory usage, standard Apache with PHP consumed about 7Mb, the lean Apache consumed 4Mb. Multiply that by 100 or 200 httpd processes and you get back a sizeable chunk of RAM. Most TGPs probably spend most of their server time sending images, so it is well worth considering the benefits. :2 cents:

If you run templates that can rebuild your site with img src's pointing to a different domain then you can set the whole thing up in less than an hour.

rowan 07-27-2004 11:10 AM

One other thing to bear in mind, once a server starts overloading it's usually the start of an exponential spiral. Doubling the load might triple or quadruple the delay that the surfers experience. So making even minor changes to ease the load can produce a much more apparent benefit.

The site I mentioned above was once reviewed as "the slowest site on the net" before I did those tweaks. :)

boneprone 07-27-2004 11:44 AM

Yeah i hear ya Rowan.

There are two options here i need to decide on.

Getting a better server, or keeping the one I have now and getting one to offload the thumbs onto and have the thumbs there.

Im just wondering how much Apache load that will save putting the thumbs elsewhere.. And XP's cpu demanding script will still be on the main server though. Its seprate from the thumb scripot.

boneprone 07-27-2004 11:46 AM

Quote:

Originally posted by rowan
One other thing to bear in mind, once a server starts overloading it's usually the start of an exponential spiral. Doubling the load might triple or quadruple the delay that the surfers experience. So making even minor changes to ease the load can produce a much more apparent benefit.

The site I mentioned above was once reviewed as "the slowest site on the net" before I did those tweaks. :)

Yeah i hear ya.

And ive been getting some real slow comments on my sites for a while now too. Just trying to figure out the best way to tackle it

boneprone 07-27-2004 12:13 PM

Doesnt seem like the new system is really making thing lighter.

Hmmm.


CPU states: 48.6% user, 0.0% nice, 47.9% system, 3.5% interrupt, 0.0% idle

Mem: 1159M Active, 371M Inact, 383M Wired, 88M Cache, 199M Buf, 9724K Free

Swap: 2048M Total, 25M Used, 2023M Free, 1% Inuse

:(

4Pics 07-27-2004 12:28 PM

hey icq me #5051691 boney

Volantt 07-27-2004 01:24 PM

You really need to reply to my ICQ and hit me up. :2 cents:

XP 07-28-2004 12:11 AM

rowan got a point. I didn't compiled apache in Boneprone's server, they did ;)
I personally don't use SO in apache, instead compile it with PHP core. And some other modules in core (only required ones)

It all works fine for me.

The bad thing about boneprone's host is, they calculate servers powers by Mbits that server push. I don't care if a server with all static content push 50mbit with same config.
We use heavy mysql operations (even they are highly optimized, you can do nothing about picking up from 700.000 galleries database)


All times are GMT -7. The time now is 05:29 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123