Re: [Astlinux-users] RAMdisk and HA
Hi Thanks for Answers. My compromised design about a VOIP system is this: 1-It is Active/Standby and saving Call states are NOT important and switch over up-til 5 minutes is ok (if Active server fails ,sip phones should register again in Standby server) 2-Not saving any Persistence data in internal Asterisk database Astdb and put it in RAMDisk. According to Freeswitch wiki(similar project)it greatly improve performance and prolong SSD life: "On a normal configuration, core.db is written to disk almost every second, generating hundreds of block-writes per second. To avoid this problem, turn /usr/local/freeswitch/db into an in-memory filesystem. If you use SSDs, it is CRITICAL that you move core.db to a RAM disk to prolong the life of the SSD." https://wiki.freeswitch.org/wiki/FreeSWITCH_DB_In_RAMdrive https://wiki.freeswitch.org/wiki/Performance_testing_and_configurations#FreeSWITCH.27s_core.db_I.2FO_bottleneck https://freeswitch.org/confluence/display/FREESWITCH/SSD+Tuning+for+Linux 3-Persistance data saved in another Sqlite3 or odbc database. Configuration files, voice files... should be synchronized between Active and standby server bidirectionally(GlusterFs,csync2,unison) also Sqlite3(rqlite?) or odbc database(postgresql bdr , mysql master master). Bidirectionally because I want when master server recovered from a failure it has all changes Slave server done (follow me changes , voice message deletes... ) another reason for bidirectional replication is may be we can put some load on standby server( some queue or some IVRs...with fallback to Active capability) 4-It is possible to use sip phones with capability of setting primary and secondary servers but IP float (Keepalived) is preferred. Regards M.Shirazi From: Michael Knill To: AstLinux Users Mailing List Sent: Monday, July 10, 2017 3:11 AM Subject: Re: [Astlinux-users] RAMdisk and HA Hi Mehdi 1. Im interested in your requirements here. Are you having performance issues with the current setup? Are the DB lookups your bottleneck? Are you using an SSD? 2. Astlinux supports WAN failover only. There are a few articles available regarding solutions for Asterisk HA but it is not an inbuilt Asterisk feature. What are your requirements for HA? 3. It should be fairly simple to build some middleware for this Regards Michael Knill From: AstLinux List Reply-To: Mehdi Shirazi , AstLinux List Date: Saturday, 8 July 2017 at 3:33 pm To: AstLinux List Cc: Mehdi Shirazi Subject: [Astlinux-users] RAMdisk and HA Hi Thanks for maintaining good project. 1-Is it possible to put internal Asterisk database in RAMdisk (tmpfs) for performance and save other persistence database in another database? 2-Is there any HA solution ? (Active /Standby, keepalived) 3-Is there any automatic two way file(database) synchronization utility ? Regards M.Shirazi -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Astlinux-users mailing list Astlinux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/astlinux-users Donations to support AstLinux are graciously accepted via PayPal to pay...@krisk.org. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Astlinux-users mailing list Astlinux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/astlinux-users Donations to support AstLinux are graciously accepted via PayPal to pay...@krisk.org.
Re: [Astlinux-users] RAMdisk and HA
Yes agreed! Regards Michael Knill From: Darrick Hartman Reply-To: AstLinux List Date: Monday, 10 July 2017 at 12:53 pm To: AstLinux List Subject: Re: [Astlinux-users] RAMdisk and HA Michael, I think the best HA middleware would be the enterprise license of VMware. With the next major release, AstLinux supports openvmtools which should allow guest fail over to a different VM host if there is a hardware issue with the original host. We had some scripts to do some “duct tape and strings” with manual triggers to do fail over of sorts for a client who wanted that in the past. It was tested, but never used in production. (so it is possible, but may not be practical) Darrick From: Michael Knill [mailto:michael.kn...@ipcsolutions.com.au] Sent: Sunday, July 9, 2017 5:40 PM To: AstLinux Users Mailing List Subject: Re: [Astlinux-users] RAMdisk and HA Hi Mehdi 1. Im interested in your requirements here. Are you having performance issues with the current setup? Are the DB lookups your bottleneck? Are you using an SSD? 2. Astlinux supports WAN failover only. There are a few articles available regarding solutions for Asterisk HA but it is not an inbuilt Asterisk feature. What are your requirements for HA? 3. It should be fairly simple to build some middleware for this Regards Michael Knill From: AstLinux List mailto:astlinux-users@lists.sourceforge.net>> Reply-To: Mehdi Shirazi mailto:mahdi_shir...@yahoo.com>>, AstLinux List mailto:astlinux-users@lists.sourceforge.net>> Date: Saturday, 8 July 2017 at 3:33 pm To: AstLinux List mailto:astlinux-users@lists.sourceforge.net>> Cc: Mehdi Shirazi mailto:mahdi_shir...@yahoo.com>> Subject: [Astlinux-users] RAMdisk and HA Hi Thanks for maintaining good project. 1-Is it possible to put internal Asterisk database in RAMdisk (tmpfs) for performance and save other persistence database in another database? 2-Is there any HA solution ? (Active /Standby, keepalived) 3-Is there any automatic two way file(database) synchronization utility ? Regards M.Shirazi -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Astlinux-users mailing list Astlinux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/astlinux-users Donations to support AstLinux are graciously accepted via PayPal to pay...@krisk.org.
Re: [Astlinux-users] RAMdisk and HA
Michael, I think the best HA middleware would be the enterprise license of VMware. With the next major release, AstLinux supports openvmtools which should allow guest fail over to a different VM host if there is a hardware issue with the original host. We had some scripts to do some “duct tape and strings” with manual triggers to do fail over of sorts for a client who wanted that in the past. It was tested, but never used in production. (so it is possible, but may not be practical) Darrick From: Michael Knill [mailto:michael.kn...@ipcsolutions.com.au] Sent: Sunday, July 9, 2017 5:40 PM To: AstLinux Users Mailing List Subject: Re: [Astlinux-users] RAMdisk and HA Hi Mehdi 1. Im interested in your requirements here. Are you having performance issues with the current setup? Are the DB lookups your bottleneck? Are you using an SSD? 2. Astlinux supports WAN failover only. There are a few articles available regarding solutions for Asterisk HA but it is not an inbuilt Asterisk feature. What are your requirements for HA? 3. It should be fairly simple to build some middleware for this Regards Michael Knill From: AstLinux List mailto:astlinux-users@lists.sourceforge.net>> Reply-To: Mehdi Shirazi mailto:mahdi_shir...@yahoo.com>>, AstLinux List mailto:astlinux-users@lists.sourceforge.net>> Date: Saturday, 8 July 2017 at 3:33 pm To: AstLinux List mailto:astlinux-users@lists.sourceforge.net>> Cc: Mehdi Shirazi mailto:mahdi_shir...@yahoo.com>> Subject: [Astlinux-users] RAMdisk and HA Hi Thanks for maintaining good project. 1-Is it possible to put internal Asterisk database in RAMdisk (tmpfs) for performance and save other persistence database in another database? 2-Is there any HA solution ? (Active /Standby, keepalived) 3-Is there any automatic two way file(database) synchronization utility ? Regards M.Shirazi -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Astlinux-users mailing list Astlinux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/astlinux-users Donations to support AstLinux are graciously accepted via PayPal to pay...@krisk.org.
Re: [Astlinux-users] RAMdisk and HA
Hi Mehdi 1. Im interested in your requirements here. Are you having performance issues with the current setup? Are the DB lookups your bottleneck? Are you using an SSD? 2. Astlinux supports WAN failover only. There are a few articles available regarding solutions for Asterisk HA but it is not an inbuilt Asterisk feature. What are your requirements for HA? 3. It should be fairly simple to build some middleware for this Regards Michael Knill From: AstLinux List Reply-To: Mehdi Shirazi , AstLinux List Date: Saturday, 8 July 2017 at 3:33 pm To: AstLinux List Cc: Mehdi Shirazi Subject: [Astlinux-users] RAMdisk and HA Hi Thanks for maintaining good project. 1-Is it possible to put internal Asterisk database in RAMdisk (tmpfs) for performance and save other persistence database in another database? 2-Is there any HA solution ? (Active /Standby, keepalived) 3-Is there any automatic two way file(database) synchronization utility ? Regards M.Shirazi -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Astlinux-users mailing list Astlinux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/astlinux-users Donations to support AstLinux are graciously accepted via PayPal to pay...@krisk.org.
Re: [Astlinux-users] RAMdisk and HA
I don't know the low-level details how Asterisk and SQLite (astdb) writes occur ... are they synchronous or asynchronous ? is the data flushed to disk after a write ? Also, it is possible using ODBC with a SQLite3 backend would have better performance than using Asterisk astdb ... Asterisk ODBC using SQLite3 https://doc.astlinux-project.org/userdoc:tt_asterisk-odbc I seem to recall there were recent changes to Asterisk 13 regarding ODBC performance. I forget the details. Lonnie On Jul 9, 2017, at 10:38 AM, David Kerr wrote: > I'm still curious as to why astdb needs to be on ramdisk. I also read from > astdb several times for every incoming call, but I don't write to it. And > Linux does a lot of filesystem cacheing... essentially the linux kernel uses > every available byte of ram to cache data and programs so that you are not > reading from physical disk (or ssd) every time you read from a file. So > until you perform a db write I am assuming that the vast majority of my astdb > reads are optimized by the linux filesystem and come from ram not ssd. > > Right? Wrong? > > David > > On Sat, Jul 8, 2017 at 12:13 PM, The Cadillac Kid via Astlinux-users > wrote: > I run my asterisk DB in RAM on my regular asterisk servers.. I have an agent > that automatically backs that up every so often to set a of files.. if my > asterisk system crashes then it reloads my asterisk DB on boot.. persistence > is maintained via storing my asterisk DB as a datadump style file on regular > storage and not just copying the astdb file (you'll corrupt it if you do > that).. > > its fast.. I use a LOT of astdb lookups in my normal call processing.. > -Christopher > > > From: David Kerr > To: Mehdi Shirazi ; AstLinux Users Mailing List > > Sent: Saturday, July 8, 2017 12:06 PM > Subject: Re: [Astlinux-users] RAMdisk and HA > > Astlinux already uses a tmpfs for most files. For those specific files that > need to be persistent astlinux uses a soft link to /mnt/kd which is > persistent store. You can see this e.g. in /var/spool/asterisk. Is there a > specific file you want to have on tmpfs that is not? > > Astlinux has HA for the external network interface. If the primary internet > link goes down it can failover to a second interface. If you are asking > about application layer asterisk HA then I am not aware of anything specific > in Astlinux for that -- you would need to research how to do that yourself > > Use rsync for file synchronization? That is what I use for daily backup to a > remote system. > > I can understand the interest in HA, but I'm curious what performance issues > you are running into with the filesystem, Astlinux is already very efficient > here. > > Regards, > David > > On Sat, Jul 8, 2017 at 1:33 AM, Mehdi Shirazi via Astlinux-users > wrote: > Hi > Thanks for maintaining good project. > 1-Is it possible to put internal Asterisk database in RAMdisk (tmpfs) for > performance and save other persistence database in another database? > 2-Is there any HA solution ? (Active /Standby, keepalived) > 3-Is there any automatic two way file(database) synchronization utility ? > > Regards > M.Shirazi > > -- -- > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > __ _ > Astlinux-users mailing list > Astlinux-users@lists. sourceforge.net > https://lists.sourceforge.net/ lists/listinfo/astlinux-users > > Donations to support AstLinux are graciously accepted via PayPal to > pay...@krisk.org. > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Astlinux-users mailing list > Astlinux-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/astlinux-users > > Donations to support AstLinux are graciously accepted via PayPal to > pay...@krisk.org. > > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Astlinux-users mailing list > Astlinux-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/astlinux-users > > Donations to support AstLinux are graciously accepted via PayPal t
Re: [Astlinux-users] RAMdisk and HA
I'm still curious as to why astdb needs to be on ramdisk. I also read from astdb several times for every incoming call, but I don't write to it. And Linux does a lot of filesystem cacheing... essentially the linux kernel uses every available byte of ram to cache data and programs so that you are not reading from physical disk (or ssd) every time you read from a file. So until you perform a db write I am assuming that the vast majority of my astdb reads are optimized by the linux filesystem and come from ram not ssd. Right? Wrong? David On Sat, Jul 8, 2017 at 12:13 PM, The Cadillac Kid via Astlinux-users < astlinux-users@lists.sourceforge.net> wrote: > I run my asterisk DB in RAM on my regular asterisk servers.. I have an > agent that automatically backs that up every so often to set a of files.. > if my asterisk system crashes then it reloads my asterisk DB on boot.. > persistence is maintained via storing my asterisk DB as a datadump style > file on regular storage and not just copying the astdb file (you'll corrupt > it if you do that).. > > its fast.. I use a LOT of astdb lookups in my normal call processing.. > -Christopher > > > -- > *From:* David Kerr > *To:* Mehdi Shirazi ; AstLinux Users Mailing > List > *Sent:* Saturday, July 8, 2017 12:06 PM > *Subject:* Re: [Astlinux-users] RAMdisk and HA > > Astlinux already uses a tmpfs for most files. For those specific files > that need to be persistent astlinux uses a soft link to /mnt/kd which is > persistent store. You can see this e.g. in /var/spool/asterisk. Is there > a specific file you want to have on tmpfs that is not? > > Astlinux has HA for the external network interface. If the primary > internet link goes down it can failover to a second interface. If you are > asking about application layer asterisk HA then I am not aware of anything > specific in Astlinux for that -- you would need to research how to do that > yourself > > Use rsync for file synchronization? That is what I use for daily backup > to a remote system. > > I can understand the interest in HA, but I'm curious what performance > issues you are running into with the filesystem, Astlinux is already very > efficient here. > > Regards, > David > > On Sat, Jul 8, 2017 at 1:33 AM, Mehdi Shirazi via Astlinux-users < > astlinux-users@lists.sourceforge.net> wrote: > > Hi > Thanks for maintaining good project. > 1-Is it possible to put internal Asterisk database in RAMdisk (tmpfs) for > performance and save other persistence database in another database? > 2-Is there any HA solution ? (Active /Standby, keepalived) > 3-Is there any automatic two way file(database) synchronization utility ? > > Regards > M.Shirazi > > -- -- > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > __ _ > Astlinux-users mailing list > Astlinux-users@lists. sourceforge.net > > https://lists.sourceforge.net/ lists/listinfo/astlinux-users > <https://lists.sourceforge.net/lists/listinfo/astlinux-users> > > Donations to support AstLinux are graciously accepted via PayPal to > pay...@krisk.org. > > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Astlinux-users mailing list > Astlinux-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/astlinux-users > > Donations to support AstLinux are graciously accepted via PayPal to > pay...@krisk.org. > > > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Astlinux-users mailing list > Astlinux-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/astlinux-users > > Donations to support AstLinux are graciously accepted via PayPal to > pay...@krisk.org. > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Astlinux-users mailing list Astlinux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/astlinux-users Donations to support AstLinux are graciously accepted via PayPal to pay...@krisk.org.
Re: [Astlinux-users] RAMdisk and HA
I run my asterisk DB in RAM on my regular asterisk servers.. I have an agent that automatically backs that up every so often to set a of files.. if my asterisk system crashes then it reloads my asterisk DB on boot.. persistence is maintained via storing my asterisk DB as a datadump style file on regular storage and not just copying the astdb file (you'll corrupt it if you do that).. its fast.. I use a LOT of astdb lookups in my normal call processing.. -Christopher From: David Kerr To: Mehdi Shirazi ; AstLinux Users Mailing List Sent: Saturday, July 8, 2017 12:06 PM Subject: Re: [Astlinux-users] RAMdisk and HA Astlinux already uses a tmpfs for most files. For those specific files that need to be persistent astlinux uses a soft link to /mnt/kd which is persistent store. You can see this e.g. in /var/spool/asterisk. Is there a specific file you want to have on tmpfs that is not? Astlinux has HA for the external network interface. If the primary internet link goes down it can failover to a second interface. If you are asking about application layer asterisk HA then I am not aware of anything specific in Astlinux for that -- you would need to research how to do that yourself Use rsync for file synchronization? That is what I use for daily backup to a remote system. I can understand the interest in HA, but I'm curious what performance issues you are running into with the filesystem, Astlinux is already very efficient here. Regards,David On Sat, Jul 8, 2017 at 1:33 AM, Mehdi Shirazi via Astlinux-users wrote: HiThanks for maintaining good project.1-Is it possible to put internal Asterisk database in RAMdisk (tmpfs) for performance and save other persistence database in another database?2-Is there any HA solution ? (Active /Standby, keepalived)3-Is there any automatic two way file(database) synchronization utility ? RegardsM.Shirazi -- -- -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot __ _ Astlinux-users mailing list Astlinux-users@lists. sourceforge.net https://lists.sourceforge.net/ lists/listinfo/astlinux-users Donations to support AstLinux are graciously accepted via PayPal to pay...@krisk.org. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Astlinux-users mailing list Astlinux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/astlinux-users Donations to support AstLinux are graciously accepted via PayPal to pay...@krisk.org. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Astlinux-users mailing list Astlinux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/astlinux-users Donations to support AstLinux are graciously accepted via PayPal to pay...@krisk.org.
Re: [Astlinux-users] RAMdisk and HA
Astlinux already uses a tmpfs for most files. For those specific files that need to be persistent astlinux uses a soft link to /mnt/kd which is persistent store. You can see this e.g. in /var/spool/asterisk. Is there a specific file you want to have on tmpfs that is not? Astlinux has HA for the external network interface. If the primary internet link goes down it can failover to a second interface. If you are asking about application layer asterisk HA then I am not aware of anything specific in Astlinux for that -- you would need to research how to do that yourself Use rsync for file synchronization? That is what I use for daily backup to a remote system. I can understand the interest in HA, but I'm curious what performance issues you are running into with the filesystem, Astlinux is already very efficient here. Regards, David On Sat, Jul 8, 2017 at 1:33 AM, Mehdi Shirazi via Astlinux-users < astlinux-users@lists.sourceforge.net> wrote: > Hi > Thanks for maintaining good project. > 1-Is it possible to put internal Asterisk database in RAMdisk (tmpfs) for > performance and save other persistence database in another database? > 2-Is there any HA solution ? (Active /Standby, keepalived) > 3-Is there any automatic two way file(database) synchronization utility ? > > Regards > M.Shirazi > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Astlinux-users mailing list > Astlinux-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/astlinux-users > > Donations to support AstLinux are graciously accepted via PayPal to > pay...@krisk.org. > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Astlinux-users mailing list Astlinux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/astlinux-users Donations to support AstLinux are graciously accepted via PayPal to pay...@krisk.org.
[Astlinux-users] RAMdisk and HA
HiThanks for maintaining good project.1-Is it possible to put internal Asterisk database in RAMdisk (tmpfs) for performance and save other persistence database in another database?2-Is there any HA solution ? (Active /Standby, keepalived)3-Is there any automatic two way file(database) synchronization utility ? RegardsM.Shirazi -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Astlinux-users mailing list Astlinux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/astlinux-users Donations to support AstLinux are graciously accepted via PayPal to pay...@krisk.org.