| PLEX86 | ||
|
understanding shared memory 3322Black Sun and said: understanding shared memory Sender: Linux Just some Perl-type discussion......(value = 2 cents :-) ) When you fork, you get an exact copy of the current process, (read "perldoc -f fork") and with Perl that means all the... Postfix-sendmail-q***l-Exim weren't doing the job? kernel programmers always want to do is to keep fork-exec overhead low. processes, after all. fork() is handled in a virtual memory-efficient way in Linux. Usually, when you fork(), you're exec()ing something else immediately afterwards, so IIRC, only the parts of the memory space that you've changed in the fork()ed process are copied; everything else is mapped. (They call this Copy-On-Write.) Yep. understanding shared memory 3323 Dances With Crows the Nope. I had my reasons, but bottom line, it's been a really interesting project. low. memory-efficient else that I'm not exec()ing anything after the fork, I'm just running another... understanding shared memory 3324 Black Sun and said: Hm. 9-10 for Hubris, 0-10 for Laziness. :-) ? fork() doesn't come into the picture for subroutines. Did you mean "spawn a... It's not possible to determine where the bottlenecks are without a lot more info than you've provided. Anyway, the way to do things is like so: 0. Make it work 1. Make it maintainable 2. Make it fast ...so unless points 0 and 1 are satisfied (are they? You didn't make this clear), you shouldn't worry about bottlenecks just yet. If this application's main job is pushing bits to Net (not LAN) -connected machines, I'd guess the bottleneck would be the upstream bandwidth. If you wrote this thing in Perl, read "man Devel::DProf", use it, and see where the thing's spending the most time. I wouldn't think fork-exec overhead would be worth considering unless you're spawning 50 or more processes at once or running on a slow machine with limited RAM. Are you doing those things? Anyway, HTH. -- Matt GThere is no Darkness in Eternity-But only Light too dim for us to see Brainbench MVP for Linux Admin mail: TRAP + SPAN don't belong
|
||||
understanding shared memory 3323 Linux groups from Newsgroups The #1 Usenet Provider on the Internet
|
||||