#1 2016-03-26 20:51:59

spiderman
Trusted Member
Registered: 2016-03-26
Posts: 25

Cpu usage examples

Hi,
I'm crawling through the forum but I can't find some clear explanation about the cpu usage limitations.
I have basically two types of cronjobs I have to run.
1. A java program that sends 500~ api requests per hour ( sometimes every 5-10 hours, sometimes every hour). It's not "violent", one request at a time. There is some cpu usage to translate the answer to a meaningful text that I later send elsewhere.
2. A crawler. This is DNS/Cpu heavy, depending on how many requests I start. It's java as well. This should run 24h per day, so either I run it with few requests per seconds or I don't run it at all. It's ok. It's just an experiment.

I'm totally fine if there is a cpu throttle that slow everything down, I just don't want to get shut down, especially for point 1. I can sacrifice project 2, since it's just for a research. If project 2. is allowed, I might buy a dozen of VPS or 100s if someone pitch in (It's kind of a "humanitarian" internet-wise research).

Any help?

thanks,
sm

Offline

#2 2016-03-26 21:02:42

lemon
Trusted Member
Registered: 2015-08-27
Posts: 132

Offline

#3 2016-03-26 21:11:08

spiderman
Trusted Member
Registered: 2016-03-26
Posts: 25

Re: Cpu usage examples

Thanks for the fast reply.
I did see it, but it's still not 100% clear to me.
I tried to "top" my app in a VM on my pc and I see it stays around 10-15% for some 5-10 seconds and then goes back to 8%. It does that for 30-40 minutes sometimes.
I'm not sure if it's enough to be sure.

Offline

#4 2016-03-27 05:16:13

willie
Trusted Member
Registered: 2013-05-05
Posts: 405

Re: Cpu usage examples

I've generally thought that java and small VPS don't mix since java is a big memory hog.  But if your thing's footprint is reasonable, maybe that's not an issue.  #1 doesn't sound like that heavy a CPU user.  #2 sounds inappropriate and you probably want dedicated servers for it.  There are some very cheap ones around these days, though not as cheap as LES.

Offline

#5 2016-03-27 09:48:42

Backtogeek
Low End Boss
From: ~/
Registered: 2013-02-13
Posts: 3,331
Website

Re: Cpu usage examples

I think willie summed it up.


http://LittleHappyCloud.net KVM VPS with 1TB Bandwidth for €3.00

Offline

#6 2016-03-27 09:55:08

spiderman
Trusted Member
Registered: 2016-03-26
Posts: 25

Re: Cpu usage examples

Ok thanks.
I'm always somehow "scared" because top doesn't seems like the best tool to measure cpu usage. I also think it shouldn't be a problem since the app just : send a request to a web service, get the answer, "dom" it and spit a string. That doesn't sound like a big thing.

#2 is really something i should do elsewhere, maybe with some help. One dedicated server actually isn't enough, not for the cpu, but for the amount of data I have to ask. I will soon publish something on my blog to ask for help if someone is interested.

Regarding Java, It all depends how you configure it. My apps works with 80mb on the jvm and 128mb of "hard" memory. I suppose I can try with less. Remember, there are java vm that runs on systems with less than 1Mb of ram (extreme example).

Offline

Board footer