Arc Forumnew | comments | leaders | submitlogin
Utilizing multiple cores with an arc web service ?
1 point by thaddeus 5483 days ago | 4 comments
OK so this stuff is new to me so it will not be a surprise when one of you folks calls bullshit and suggests more realistic ideas. :)

I currently use Linode for my web servers and Linode has 4 processor Xen instances. I have Apache set up to mod proxy IP/domain requests off to various ports for the multiple domain/instances of arc servers.

As I understand it arc only utilizes 1 core per instance. This means I am not getting full value :(. Or does this even matter on a VPS ?

So I was thinking I could create a routing service where an arc server accepts all requests and each user gets assigned a port (each port having its' own arc instance).

All data is exchanged via http in json format and a single mysql database maintains data for all arc instances.

This seems, to me, a straight forward means to utilize multicore performance with arc.

Does this seem reasonable? Am I blatantly lacking some fundamental knowledge that would make this a bad approach ?

Thanks,



1 point by aw 5483 days ago | link

Sounds fine to me.

Though I suppose if you have zillions of users you might not want to be using up your memory making Arc instances for each one.

There's no benefit to having more Arc instances than you have CPU's, at least in terms of using all your CPU's.

So you might assign each user to one of four Arc instances.

Having a particular user always go to one Arc instance is useful since you don't lose your in-memory data structures like fnid's for that user.

For communicating between Arc instances you don't have to use JSON, though you certainly could, you could use Arc's read and write to be communicating with Arc data instead. It probably doesn't make a big difference either way.

-----

1 point by thaddeus 5483 days ago | link

thanks... &

> you might not want to be using up your memory making Arc instances for each one

Yeah I was thinking of using 4 to 8 instances, but scaling is a good question... when to add more :)

-----

1 point by aw 5483 days ago | link

I haven't done any testing along these lines, so I don't know what the actual answer is, but I don't think adding more Arc instances than you have CPU's would do anything except use up more memory...

edit: though I suppose it's possible that garbage collection times might not scale linearly... if it takes more than twice as long for the garbage collector to run on twice as much data, then a larger number of smaller processes might give you some kind of performance benefit.

-----

1 point by thaddeus 5483 days ago | link

that makes sense... I'll stick with 4 then.

-----