Hello,
Some month ago I started to do some experiments with multiple vvvv instances and I found there are incredible computational power resources if you build your application in a proper way:
Most of the time you have big modules-engines that evaluate complex algorithms and just output simple data.
Allocating them on different thread (vvvv instances assigned to different CPU cores) really opens new degrees of possibilities in terms of CPU power usage.
From a sad 15% CPU usage I can jump to 100% if the patches are well structured, using all the 8 CPU cores instead of single one.
The most annoying part is vvvv instances data communications:
I’m wondering if there’s a better way than UDP to send data between two instances.
sendind raw data to local host is quite fast, but I’m thinking at something more practical, which requires no organization of data, like we do with S R nodes.
Also, if you want to send the same spread of values to two different instances, they can’t receive UDP from the same port, so you need to send twice, keeping track and organizing all the incoming-outcoming ports for every instance.
Shared Memory.
From what I understood this is the most direct way to give to the instances the access to the same resource.
I found shared memory nodes to share Textures (both dx9 and dx11), DShow9, Windows.
Nothing for raw or values.
Would not be cool to have a AsSharedMemory (Raw) node? also SharedMemory (Value) directly…
Apart these practical things I found the multi-vvvv approach extremely interesting.
What do you devvvvs thing about it? Maybe improving communication and facilitating software development on multiple instance could be one solution to single thread bottleneck?
I imagine a scenario where you can place a SharedMemory (raw) in your module, tag it with a string (like for Send nodes).
Then internally all the sharedMemory tags (with the associated pointers info) are sent to all the instances.
In another instance my GetSharedMemory (raw) node allows me to choose from available tags, or simply I just put the tag I need (like we do with string2enum in R nodes).
simple as R S routines…
am I missing something fundamental? :)
cheers