Hello,

The 140 liquidsoaps are running on a dual-CPU xeon 5500 series (8 physical 
cores - 16 logical cores HT) with 12 GB RAM.

On a single core i7 processors we run 80 liquidsoap instances.

On a single core2duo we ran 25 liquidsoap instances (we don't have anymore this 
kind of servers).

Here is my script :

#!/usr/bin/liquidsoap
set("scheduler.log",false)
set("log.level", 4)

# Live Settings : from the command line args
liveport = int_of_string(argv(5))
livepass = argv(6)
set("harbor.bind_addr","0.0.0.0")
set("harbor.port",liveport)
set("harbor.password",livepass)
set("harbor.icy",true)

# RM Settings : when not live args from command line
fluxid = argv(1)
name = argv(2)
description = argv(3)
finaldesc = string.replace(pattern="_",(fun (s) -> " "),description)
genre = argv(4)
rmeffect = argv(7)
liveeffect = argv(8)
mountpoint = "flux-"^fluxid
# path to php script getting the next song to play and cutting the files (at 
intro and extro point)
cmd = "/mm/grabcf.php "^fluxid

# RM Dynamic request
input2 = request.dynamic(id=fluxid, fun () -> request(get_process_output(cmd)))

# Default mix (could be overwritten)
def our_crossfade(~start_next,~fade_in,~fade_out,s)
  s = fade.in(duration=fade_in,s)
  s = fade.out(duration=fade_out,s)
  fader = fun (a,b) -> add(normalize=false,[b,a])
  cross(conservative=true,duration=start_next,minimum = -1.0,fader, s)
end

# Crossfade
input2=our_crossfade(start_next=6.0,fade_in=3.0,fade_out=3.0, input2)

# Compress/Normalize (if end user asks we normalize and compress)
if rmeffect == "1" then
        input2 = nrj(input2)
end
# Managing meta
input2 = rewrite_metadata([("artist",'$(if 
$(display_artist),"$(display_artist)","$(artist)")'),("title", '$(if 
$(display_title),"$(display_title)","$(title)")'),("album", '$(if 
$(display_id),"$(display_id)","$(album)")')],input2)
# Send info to Radionomy webservices
input2 = on_metadata(fun (meta) -> system("curl 
http://webservices.tld?param="^fluxid^","^quote(meta["album"])^" &"),input2)

# This defines a source waiting on mount point /test-harbor
live = input.harbor(buffer=7.0, max=20.0, "/")
#Compress/Normalize live flux (if end user asks for it)
if liveeffect == "1" then
live = nrj(live)
end

# Define crossfade RM to Live
def livefade(previous,next)
  add([fade.initial(duration=4.,next),fade.final(duration=1.,previous)])
end

# Define crossfade Live to RM
def backlivefade(previous,next)
 source.skip(next)
 add([fade.initial(duration=4.,type="exp",next), previous])
end

# Info sent to webservices during live
live = on_metadata(fun (meta) -> system("curl --data-urlencode 
"^"string="^fluxid^"£"^quote(meta["song"])^"£"^quote(meta["title"])^"£"^quote(meta["artist"])^"£"^quote(meta["duration"])^"£"^quote(meta["album"])^"
 otherservices.tld/live &"),live)

# Define source order
live = fallback (track_sensitive=false,transitions=[livefade,backlivefade], 
[live, input2])

# Output to icecast
output.icecast.mp3(mount=mountpoint, host="localhost", port=8080, 
password="secretone", genre=""^genre, url="http://www.radionomy.com";, 
name=""^name,description = ""^finaldesc,restart=true, mksafe(live))

HTH,

Jef

On 26 Mar 2011, at 09:33, Davit Barbakadze wrote:

> Hi Jean,
> 
> How do you manage to run 140 Liquidsoap instances in parallel? Do you
> mean on single machine, or you have farm? What is the maximum number
> of instances you can run on single machine?
> 
> I have 15 on my quad-core dual-processor (2 x Intel(R) Xeon(R) CPU
> E5405 @ 2.00GHz,  8 GB RAM) and it nearly dies already :| Channels are
> stuttering now and then and logs are bloated with "We must catchup..."
> messages.
> 
> I should say though, that I decided to run all channels on a single
> process at the moment, since having them separate, kills server even
> faster :|
> 
> 
> Davit Barbakadze
> 
> 
> 
> 
> On Thu, Mar 10, 2011 at 9:03 PM, Jean-Francois Mauguit
> <j...@radionomy.com> wrote:
>> Hello,
>> 
>> In fact we are running 140 Liquidsoap instances in parallel on our most 
>> recent servers with harbor input on each instance. We don't have any 
>> problems with it :-)
>> 
>> HTH
>> 
>> Jef
>> 
>> On 10 Mar 2011, at 17:59, David Baelde wrote:
>> 
>>> Hi,
>>> 
>>> It's perfectly possible to have 16 liquidsoap, each one having an
>>> harbor input. (In fact, radionomy does something similar.) You can
>>> also have 8 liquidsoap instances, each one having two harbor inputs.
>>> It does not matter if they are all active at the same time or not. All
>>> that matters is that each one has a different port. So in the first
>>> script you'll have for example input.harbor(port=8005,mount1), in the
>>> second input.harbor(port=8006,mount2) etc. The mount names can be the
>>> same, since they are on different harbor ports.
>> 
>> 
>> 

-- 
Jean-Francois Mauguit - Radionomy CTO
Boulevard International 55 K
1070 Bruxelles - Belgique



------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to