How do clusters work from an OS point of view?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
tom1000000

How do clusters work from an OS point of view?

Post by tom1000000 »

Hello,

I was just reading up about clusters and am not quite sure how they work, in terms of processes and threads etc.

As an example say there is a 4 node cluster.

Process PID 1 starts running on node A.
Process PID 2 then starts and the OS places it on node B.

Its obvious there are performance improvements in the above scenario, compared to just 1 computer.


What happens if Process 1 creates a new thread? Can the new thread run on node C?

As threads from the same process access the same virtual address space, is it possible to run multiple threads on different nodes?

How do Oracle clustered databases work? Is it multithreaded or a separate process created for each database query????

Also, what happens with IPC on a cluster? Shared memory would be a lot of fun. I guess it just gets more complicated for the OS.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:How do clusters work from an OS point of view?

Post by Pype.Clicker »

tom1000000 wrote: Hello,

I was just reading up about clusters and am not quite sure how they work, in terms of processes and threads etc.

As an example say there is a 4 node cluster.

Process PID 1 starts running on node A.
Process PID 2 then starts and the OS places it on node B.

Its obvious there are performance improvements in the above scenario, compared to just 1 computer.


What happens if Process 1 creates a new thread? Can the new thread run on node C?
well, i'm not sure, but i would tell that starting a new thread on another node would be a bad idea.
First because threads assume they share memory. Nodes don't.
Secondly, because threads also share stuff like file descriptors, etc. If your 2 threads are on distinct machines, how will you keep consistency among the modifications made by the different nodes to the common shared file ?

I don't say it's impossible, i just say its unnatural for threads ...

How do Oracle clustered databases work? Is it multithreaded or a separate process created for each database query????
I don't have the slighest technical info about this, but i guess it could make sense to say each node holds a subset of the database and that requests are directed to the right node by some manager logic.
At each node, you may have multithreading (for instance, one thread per serviced request) so that your thread may be locked (waiting for a table to become accessible) while other threads that need other tables still run ...
Also, what happens with IPC on a cluster? Shared memory would be a lot of fun. I guess it just gets more complicated for the OS.
Usually, a cluster environment will require clustered application to use specific IPC mechanisms (afaik). Technically, there _are_ projects that offer clustered shared memory (i think MACH did it through its memory objects paradigm, afaik)
tom1000000

Re:How do clusters work from an OS point of view?

Post by tom1000000 »

Hi,

Well it seems that applications have to be specially written to take advantage of clustering. So if you have an application (eg apache) that needs more CPU, you can't just throw it on a cluster unfortunately (unless you rewrite it obviously).

ALso, I doubt that each node in an Oracle cluster stores a part of the DB on its hard drive.

Oracle claim that any of the computers can fall over and it doesn't matter. I guess somehow the data must be redundantly stored. Also one table (or certain rows) in the database could easily get accessed a lot more than the rest of the DB, so how does the DB balance out the requests to each node if they are all accfessing the same data?

Noone really knows except Oracle Inc I guess.
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:How do clusters work from an OS point of view?

Post by distantvoices »

In case of oracle: they have proprietary failover & loadbalancing solutions. Thus you can have two or more servers mirroring one database. One of them is the master node and dispatches the request to the other nodes via algorithms like weight balancing, round robin, weighed round robin and so forth...

In case of an apache cluster: you 'll ofcourse need one master node which takes the task of the load balancing as described above with oracle. This node dispatches incoming requests according to the load balancing policy to the other nodes in the cluster network.

clustering in general: look for beowulf project, PVM and other distributed multiprocessing tools. They do in general nothing more than dispatching Tasks to nodes and then collect the results of the nodes. thus you can f. ex. render huge animations in a very short time. But mark: in a network cluster, there does not exist something like shared memory! You always work with full fledged processes started on the nodes by request of the master. It's just a question of networked IPC with messages/tcp/ip packets.

hope this clears some questions. Especially look for beowulf in internet. It's a quite ineresting project.
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
tom1000000

Re:How do clusters work from an OS point of view?

Post by tom1000000 »

Hi,

Thanks for your description of Oracle and Apache clusters. If there is a master node, is that not a single point of failure?

How can you claim clusters are fail proof if there is a single point of failure???? Thats the impression I get from Oracle's marketing anyway.

Tom
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:How do clusters work from an OS point of view?

Post by distantvoices »

In case of the apache cluster the masternode which takes care of the dispatch of requests amongst nodes, You are of cours right with your statement that it is a single point of failure ... but it is not the only single point of failure in a star topology network like ethernet. There I think also of the switch/hub as a single point of failure. This in Mind, You can design your apache cluster in a way that you have TWO entry points (master nodes) taking care of load balancing.

In case of Oracle: since the two (in the simplest case) are mirrored, the node which does not act as master, is usually configured to take the master nodes tasks, if this server fails. To achieve this, such servers are often connected via an extra ethernet connection or direct rs232 communication line (or similar - a way to pass info throu' and forth)

If you are familiar with novell netware clustering and high availability solutions as well as their QoS-facilities you'll find that Netware, since developed as a pure server OS (for File, Directory, Usermanagement, ZEN tools for distributable userprofiles, printer, webserver etc...) comes along with stable clustering functions.

stay safe
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
Post Reply