YJ Park's profileYJParkPhotosBlogListsMore ![]() | Help |
|
|
8/8/2006 Runing Postgresql in Ramfs for Great Performance in TestingAs a database server, postgresql make a lot efforts to make the data as secure as possible, but in some certain cases, we don't need these features, we just want it as fast as possible, e.g. in testing. When doing testing, postgresql will access disk to write the data and logs, cause a very big iowait. By running postgresql in ramfs, we can make it much faster.
Ramfs is just using ram to simulate a file system, it's in ram, so it's very fast, of course you need to have enough ram for that.
Here is the script I use to start a second postgresql server at a given port:
After the server start, need to do some setup:
Using it in nordicbet team:
the postgresql port support is in trunk now, you can just add these two lines to your local config:
After setting this, I can run the ftest 30% to 40% faster, I think it's pretty worth doing. 6/9/2006 Share Music, Page 2New client for daap accessThe current rhythmbox in Debian testing(0.9.4.1) already has the ability to access daap shares now, but by default, it will not install the library for daap access, you can install it byapt-get install rhythmbox avahi-daemon Allow multiple programs play sound at the same timeby default there is only one program can output to the sound card, it's possible to allow multiple, here is my configuration, you need to put then into ~/.asoundrc pcm.nforce-hw { type hw card 0 } pcm.!default { type plug slave.pcm "nforce" } pcm.nforce { type dmix ipc_key 1234 slave { pcm "hw:0,2" period_time 0 period_size 1024 buffer_size 4096 rate 44100 } } ctl.nforce-hw { type hw card 0 } Be careful, for better sound quality, I am using the spdif(digital optical, IEC958, different name, same stuff in this case) output as default, you may need to change hw:0,2 to hw:0,0 to use the anolog output. You can use 'aplay -l' and 'aplay -L' to see the current avaliable alsa devices and current pcm setting P.S. Just found out this setting will make the sound recording not working, so if you want to use something like skype, you can not use my setting. If you know how to make the multiple source and recording work together, please add a comment, thanks. I have tried to follow some tips on that, not lucky with them, and I don't care this function now, so will not spend more time on it. 3/29/2006 Sharing Music Between UsListening to music is very important to me, make me more concentrating and much happier working. But sometimes I may want to listening something new, radio is not bad, while you can not control over it, sharing music between us will be a good idea, this blog is telling how to do that under debian linux. I like iTunes very much, it's very good to listen and manage music files, and it's sharing is very good. Unfortunately there is no iTunes on linux, and running it in a virtual machine is not very comfortable, so I spent a little time to find out what we can get under linux for music sharing. I choose mt-daapd to share my music to others, and git(Get It Together) to play music from others' machine. I have put the install script to ExoSetup, you can install it by running exosetup import yjpark exosetup install yjpark-jdk1.5 exosetup install yjpark-music There are only very few settings you need to change for mt-daapd, in /etc/mt-daapd.conf admin_pw your password to admin the server mp3_dir where you put the music files, should be readable to all users serverName name of your music service You can admin mt-daapd by browser, just goto http://localhost:3689 git is written by java, that's why we need to install jdk1.5, and the current chinese fonts support is only done under jdk1.5, so I suggest you install it. And the chinese fonts using simsun.ttc, if you install your chinese font by using 'exosetup install chinese', then it should be under /usr/share/fonts/truetype/simsun/ If not, you need to specify the right path in /usr/lib/j2sdk1.5-sun/jre/lib/fontconfig.properties git has its own server, but I think mt-daapd is better, and I use amarok to play local files, you can disable it under Settings |
|
|