12/17/2023 0 Comments Flat file systemSimilar setting on mysql server side define the maximum of concurrent client connections in /etc/mysql/my.cnf. You can configure the maximum open connection in php.ini I think. In php (client side) its the function to open a connection its mysql-pconnect( ). But that's a whole other topic.ĥ- can multiple scripts connect to the same DB simultaneously? Where the cache mechanism is more likely to be crude and hit the hard drive systematically for non changing static data.īetter result can be reach with a load balancer, clustering with a back plane connections up to ram based SAN array. ![]() If your looking to optimize performance using ram, I would first look at running your php scrips, html pages, and small images from a ram drive. Better to properly tune the database configuration. Because they cache in memory, making it run entirely from memory is most of the time ineffective and dangerous. Most databases have in memory cache for query results, search indexes, making them very hard to beat with a flat file. Which can lead to slowdown, corruption up to dead lock if you have a bug. If your going with a flat file, you will need to synchronize your scripts when the file change using custom lock mechanism. ![]() Use flat files for jobs based system(Aka, simple logs parsing), not for web searches queries. Making the write queries usually slower than simple reads. Also if there is lot more write than read, flat file also shine, most default databases setups will need to make the read queries wait for the write to finish in order maintain indexes and foreign keys. If the data dont fit in memory and need to be read fully to get the job done, It 'can' be faster than a database. They are faster if the data is read from start to finish without any search or write. Flat file can be faster than a database, but in very specific applications.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |