Kaya 的个人资料花开花落,云卷云舒照片日志列表 工具 帮助

日志


9月18日

Open Source and Oracle -- OCFS2

Back to introduce the open source projects maintained by Oracle.

OCFS2 is the next generation of the Oracle Cluster File System for Linux. It is an extent based, POSIX compliant file system. Unlike the previous release (OCFS), OCFS2 is a general-purpose file system that can be used for shared Oracle home installations making management of Oracle Real Application Cluster (RAC) installations even easier. Among the new features and benefits are:

  • Node and architecture local files using Context Dependent Symbolic Links (CDSL) (symbolic link tod/ different file on different hostname/architecture)
  • Network based pluggable DLM (distributed lock management)
  • Improved journaling / node recovery using the Linux Kernel "JBD" subsystem
  • Improved performance of meta-data operations (space allocation, locking, etc).
  • Improved data caching / locking (for files such as oracle binaries, libraries, etc)

OCFS2 comes bundled with its own cluster stack, O2CB. The stack includes:
· NM: Node Manager that keep track of all the nodes in the cluster.conf
· HB: Heart beat service that issues up/down notifications when nodes join or leave the cluster
· TCP: Handles communication between the nodes
· DLM: Distributed lock manager that keeps track of all locks, its owners and status
· CONFIGFS: User space driven configuration file system mounted at /config
· DLMFS: User space interface to the kernel space DLM

O2CB instance runs on each node, and provides the read/write and lock control for nodes access, throught network communication.

wait a minute, so many people on the Internet expressed their complains about ocfs/ocfs2. It's not stable, caused the system to hang, unknown issues, under development, not suitable for production environment...

Cluster file system is a anothe direction to follow for Oracle. Wish OCFS2 will be bettter and better.

9月17日

Linux kernel timer and VMware

There are a few timer in Linux Kernel:
PIT:programming interval timer,oldest PC timer device, contains three identical timers, Timer 0 can generate an interrupt and is suitable for system timekeeping. Timer 1 was historically used for RAM refresh. Timer 2 is wired to The PC speaker. Linux and most uniprocessor versions of Windows use PIT 0 as the main system timer.
CMOS RTC: part of the battery-backed memory device that keeps a PC's BIOS settings stable while the PC is powered off. There are a time of day(TOD) clock that keep time in year/month/day hour:minute:second format.
Local APIC: a part of the interrupt routing logic in modern PCs.
ACPI:is an additional system timer that is required as part of the ACPI specification. It continues running in some power-saving mode in which other timers are stopped or slowed.
TSC:a 64-bit cycle counter on Pentium CPUs and newer processors. It's the finest-grained, widest, and most convenient timer device to access so far.
HPET:high precision event timer, a device available in some newer PCs.
 
Linux kernel use periodic timer interrupts for timekeeping and scheduling.Linux kernel 2.6 implements several different algorithms for interpolating the system time and lets you choose between them with the clock= kernel command line option.
clock=tsc and clock=pmtmr:these two aloorithms incorporate code that attempts to automatically detect lost ticks from non-processed timer interrupts and add extra ticks to correct for the time loss. But they may add extra, spurious ticks to the operating system clock when timer interrupt handling is delayed such that two interrupts are handled in close succession, but neither is lost.
clock=pit:simplest but most robust of the available algorithm. It uses only the PIT counter for interpolation, doesn't include tick correction code, so it doesn't gain time, but it does lose time when a tick is actually lost.
 
With VMware, please choose clock=pit, and then use the vmware tool to ajust the time lost. Experiment showed t hat with clock=tsc, your vmware guest operating system will be 10% faster than your windows host system.
Note: vmware tool does not ajuest the time gained, that is if the guest operating is faster than host system, vmware will take no action. The behaviour is for preventing the strange behavour of some application if time being ajusted backward.
 
reference:
 
 
9月10日

Open Source and Oracle -- PL/FLOW

PL/SQL is a language which must be mastered if you want to master Oracle. A lot of work can be done through PL/SQL programming. Another tool of necessity is sqlplus scripts. Maybe I can say that it's just like a shell in Linux, simple but powerful.
PL/FLOW is an workflow engineer written in PL/SQL. Also it's located in sourceforge: http://plflow.sourceforge.net/.
This project utilizes the WfMC standard, which is a standard for workflow engine.WfMC stands for Workflow Management Coalition.
Two years ago, I, with some classmates, studied WfMC for a company, mainly in the implement. And we chose OBE(Open Business Engine), a java-based implement of WfMC. The good old days! Configuration and reading the code is so puzzled, because OBE uses a lot of java frameworks, a great challege for me, a java newbie.
But this PL/SQL based implement seems "simple", having extremely less code than OBE. just some tables, indexes, sequences, triggers, procedures..
the workflow engine can also accessed by web, through PHP using OCI.
Everything seems perfect, so why not have a try?
 
 
9月6日

grep -rIc ".*" . | awk -F : '{if($2!=0)print($1)}'

what this sentence mean?
 
yep, it's suitable for this situation below:
You want to find what text files exist in a specific directory, which can have unlimited sub-ddirectories. and list them out.
 
This solution seems strange, I just use the parameter -I of grep to test whether a file is a text file or a binary file, maybe a command exists for checking whether a file is text or binary? If you know it or have better method, please let me know.
 
 
 
9月3日

Open Source and Oracle

Oracle Open Source is a web site initiated by Oracle. Its focus is to enhance and improve Linux in the interest of making Oracle products perform better, faster, and more reliably.
Anyway, Open source about Oracle is a big field, many open source projects related to Oracle exists. They can be cataloged as below roughly:
  • security ( system and database)
  • monitoring ( system and database)
  • tunning
  • performance, load test, benchmark, etc
  • Oracle technology, such as RAC, TimesTen, etc
  • projects using PL/SQL, OCI, etc
  • adminstrative tools, such as Oracle session, schema, tracing
  • other database, such as PostgreSQL, Berkeley DB, etc

(Note that Linux is most preferred operating system here, as it's OPEN SOURCE.)

So, my more attention will be put to this area, just to learn what open source can utilize Oracle, and what open source can bring Oracle.
Maybe one project per week will be introduced, depending on my spare time. Anyway, I will try my best to make it alive.