in reply to CPU usage on external UNIX host

I would guess that there is something else going on here that caused your provider to suspend your account.

What does your CGI do? Does it use fork, grab lots of memory, do other things that are "antisocial"? Is there any way you can post the code?

--MidLifeXis

Replies are listed 'Best First'.
Re^2: CPU usage on external UNIX host
by vit (Friar) on Nov 17, 2009 at 22:23 UTC
    I talked to them and got an email and it was actually memory usage. Sorry, not CPU.
    I do use much of memory, maybe 0.5G, not a big deal actually, but this was the first time I was in trouble. I do not use fork. So probably I need to verify available memory?
      If you have shell access to the server, running top, vmstat, sar, mpstat (if it's a multiple CPU system) and iostat are good indicators of system performance. Details are in the manpages.

      Specifically for your code, though, I'd highly suggest benchmarking your code with Devel::NYTProf, or at least Benchmark (comes with perl). That should help isolate where in your code memory is getting chewed up.

      I'd also suggest some putting some logging in your code, so you can go back and troubleshoot why the memory usage from your CGI was high, and ideally, to be able to recreate the problem on a test system.

      Without seeing any of your code, I can't give anything specific.

      -- Burvil

      ...you seem to be slightly confused as to what got you shut down..... are you sure it wasn't "excessive bandwidth usage"? .... it uses the same terminology (Megabytes, Gigabytes, etc) as memory......

      ......it could be your isp scamming for more money.... i had an isp, was very cheap...even recommended them here as an isp.....like only 2 bucks per month...... THEN suddenly they said i was exceeding my bandwidth limit..... and needed to contact their tech dept...... it was a bulsh*t ploy to get me to upgrade to more expensive service(more bandwidth)...... it's something to think about if your script used to work fine, and now suddenly your bandwidth exceeds limits :-)


      I'm not really a human, but I play one on earth.
      Old Perl Programmer Haiku