Oct
27
2008
0

Giant Java Processes

As we see that the resident memory (RES) got for the java/jvm is 3.9 GB. As we are on an 32-bit system, that is basically pushing the limits of the address space. For this to happen the max heap for the JVM being run should have been set at least 4GB. (more…)

Share
Written by in: development,java,kernel,linux | Tweet This
Sep
15
2008
0

USB TV BOX

Just got a noname MODEL:USB2.OBOX (or 0BOX?) and attached to my D630 running EL5U2 (i386).. Attaching gives
Jul 30 13:19:55 localhost kernel: usb 2-1: new high speed USB device using ehci_hcd and address 7
Jul 30 13:19:55 localhost kernel: usb 2-1: configuration #1 chosen from 1 choice

in messages and got a brand new

Bus 002 Device 007: ID 6000:0001

from lsusb. Got some hopeless response from ubuntuforums and tv-cards. Still proceeding…

$ lsusb -d 6000:0001 -v

Bus 002 Device 007: ID 6000:0001
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x6000
idProduct 0x0001
bcdDevice 0.01
iManufacturer 16
iProduct 32
iSerial 64
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 78
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 48
bmAttributes 0x80
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 255
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0000 1x 0 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 1
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 255
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x1400 3x 0 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 2
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 255
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x1400 3x 0 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
can’t get device qualifier: Operation not permitted
can’t get debug descriptor: Operation not permitted

this is not much helpful (yet)..

The

idVendor 0x6000
idProduct 0x0001
bcdDevice 0.01
iManufacturer 16
iProduct 32
iSerial 64

tells
me that this is actually some common chip / device. Still I doubt a
generic driver to be around. Shall check with Fedora 9 too.

Now testing via VMWare workstation on XP .. Just to be sure that the device is working..

–>
And VMWare installation fails with a blue screen .. Maybe it is vmware
or worse it is the device itself .. I shall test this on a native
environment .. Maybe that Toshiba Satellite notebook.. Hmm..

Tuesday, July 29, 2008


A basic LVM Setup

# fdisk -l

Disk /dev/hda: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 522 4088542+ 8e Linux LVM

Disk /dev/hdb: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 1 522 4192933+ 83 Linux

# pvcreate /dev/hdb1
Physical volume “/dev/hdb1” successfully created
# vgcreate vg1 /dev/hdb1
Volume group “vg1” successfully created

# lvcreate –size 1G vg1
Logical volume “lvol0” created
# ls -l /dev/vg1/lvol0
lrwxrwxrwx 1 root root 21 Jul 29 20:27 /dev/vg1/lvol0 -> /dev/mapper/vg1-lvol0
# mkfs.ext3 /dev/vg1/lvol0
mke2fs 1.35 (28-Feb-2004)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
131072 inodes, 262144 blocks
13107 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=268435456
8 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376

Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 22 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.

# mount /dev/vg1/lvol0 /mnt
# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
2967320 860884 1955704 31% /
/dev/hda1 101086 10199 85668 11% /boot
none 254472 0 254472 0% /dev/shm
/dev/mapper/vg1-lvol0
1032088 34092 945568 4% /mnt

Share
Sep
15
2008
0

Cisco VPN Client 4.8 and Recent Linux Kernel Versions

I have been playing with this for some time .. Below are patches over Cisco VPN client 4.8 rev 490 some are compiled from around and some are my own ports (especially for 2.6.24+ ):

For 2.6.18 based kernels (OEL/RHEL/CentOS 5), download and apply vpnclient-4.8-2.6.18-XceptN.patch on your vpnclient build directory. e.g.:

# wget -q http://xceptn.com/patches/vpnclient/vpnclient-4.8-2.6.18-XceptN.patch
# cd vpnclient
# patch < ../vpnclient-4.8-2.6.18-XceptN.patch

For 2.6.24/25 (Fedora 8, 9 (Beta)) series I have used vpnclient-4.8-2.6.25-XceptN.patch. e.g.:

# wget http://xceptn.com/patches/vpnclient/vpnclient-4.8-2.6.25-XceptN.patch
# cd vpnclient
# patch < ../vpnclient-4.8-2.6.25-XceptN.patch

The patches are just dirty workarounds. But they work well 🙂

Share
Sep
15
2008
0

Reading for Linux Kernel internals

It is really nice to read “Understanding the Linux Kernel” by Bovet & Cesati (O’Reilly).. Strongly advised..

Share
Written by in: development,kernel,linux | Tweet This
Sep
15
2008
0

The vm.swappiness Parameter in Linux 2.6 Kernels

The vm.swappiness parameter for Linux 2.6 kernels is based on a scale
from 0 to 100. The default is 60 and it is known to serve Oracle RDBMS
related workloads statistically the best.

The swappiness defined
by this parameter, is for a raw and general priority paging. This is
about prioritizing the page-out of pages from anonymous vs. file-backed
memory. Anonymous memory would be the private memory areas of the
processes generally. File-backed memory is the area of memory where a
file is mapped into using mmap(). It applies to different filesystems
like ocfs2 or ext3.

The “buffers” area that we see in the “free”
command output, or meminfo etc. is also file-backed memory, a subset of
file-backed memory nowhere mmap()’d. Basically if we have a lot such
I/O, we will have larger filesystem buffers dynamically no matter we
use Direct I/O or not. That can be checked from /proc/meminfo or free
Regarding the different values for the parameter:

* More swappiness tends to prefer to page out anonymous memory more.
* Less swappiness avoids pageout of anonymous memory more.

Paging
files are a simpler compared to anonymous memory, and having a low
swappiness can help with the performance. But this really depends on
how much the workload needs the free anonymous memory and free
file-backed memory. For Oracle RDBMS like workloads, the file-backed
memory is critical and it is not a good ide to have related memory
paged-out.

Share
Written by in: kernel,linux | Tweet This

Powered by WordPress | Theme: Aeros 2.0 by TheBuckmaker.com