BlockingQueue on SMP (Multiprocessor)
hi guys,
i wrote an udpmulticast application, it has some threads.
thread 1 gets a datagramm-packet from socket with receive, creates an object and puts it (with offer-method) in the blockingqueue (LinkedBlockingQueue impl.)
thread 2 gets objects from the queue with poll-method
the problem:
on my laptop (single cpu) works the app fine
but on an multicpu-computer it works with errors, poll-method returns not all objects, etc.
are blockingqueue implementations threadsafe in smp environment?
many thanks,
grigory
is it possible i have a bug in my code?Yes.
why not sun too?Yes, they can have bugs too, but it's more likely that you have a bug.
With multiple processors those bugs appear a lot easier than with just one, so even though your code works with one processor, you might've written some bad code that exhibits these problems on an SMP machine.
Similar Messages
-
Hotspot leaks memory on smp linux
When our application is started, all physical memory of 8GByte (aloted with ulimit) is consumed on startup, even if Java heap is restricted to 1 GByte with -Xms1024m -Xmx1024m. Ultimately we get an
Exception in thread "CompilerThread0" java.lang.OutOfMemoryError: requested 3275 6 bytes for ChunkPool::allocate. Out of swap space?
Leak is reproducible with Java5 on smp (multiprocessor) Linux with 8GByte Ram, 2 dual core Opteron 2220 SE.
-Xint will not leak.
Java 6 will not leak.
Single core will not leak.
Solaris on Sparc will not leak.
We do not use any native libs other then JDKs.
We believe this is a bug in the Linux Java 5 distribution and switched to Java 6. Sounds familiar to anybody?When our application is started, all physical memory of 8GByte (aloted with ulimit) is consumed on startup, even if Java heap is restricted to 1 GByte with -Xms1024m -Xmx1024m. Ultimately we get an
Exception in thread "CompilerThread0" java.lang.OutOfMemoryError: requested 3275 6 bytes for ChunkPool::allocate. Out of swap space?
Leak is reproducible with Java5 on smp (multiprocessor) Linux with 8GByte Ram, 2 dual core Opteron 2220 SE.
-Xint will not leak.
Java 6 will not leak.
Single core will not leak.
Solaris on Sparc will not leak.
We do not use any native libs other then JDKs.
We believe this is a bug in the Linux Java 5 distribution and switched to Java 6. Sounds familiar to anybody? -
How to create an asm instance manaually? oracle 11gr2.
env: oracle 11gr2 os: hpux or aix single machine , not rac.
question:how to create an asm instance manaually?? diskgroup,listener,db ,they can be resigistered to crs??
can anyone give me document about it?Hi,
This is a simple answer:
Automatic Storage Management (ASM)
ASM was a new storage option introduced with Oracle Database 10gR1 that provides the services of a filesystem, logical volume manager, and software RAID in a platform-independent manner. ASM can stripe and mirror your disks, allow disks to be added or removed while the database is under load, and automatically balance I/O to remove "hot spots." It also supports direct and asynchronous I/O and implements the Oracle Data Manager API (simplified I/O system call interface) introduced in Oracle9i.
ASM is not a general-purpose filesystem and can be used only for Oracle data files, redo logs, and control files. Files in ASM can be created and named automatically by the database (by use of the Oracle Managed Files feature) or manually by the DBA. Because the files stored in ASM are not accessible to the operating system, the only way to perform backup and recovery operations on databases that use ASM files is through Recovery Manager (RMAN).
ASM is implemented as a separate Oracle instance that must be up if other databases are to be able to access it. Memory requirements for ASM are light: only 64 MB for most systems.
Installing ASM
On Linux platforms, ASM can use raw devices or devices managed via the ASMLib interface. Oracle recommends ASMLib over raw devices for ease-of-use and performance reasons. ASMLib 2.0 is available for free download from OTN. This section walks through the process of configuring a simple ASM instance by using ASMLib 2.0 and building a database that uses ASM for disk storage.
Determine Which Version of ASMLib You Need
ASMLib 2.0 is delivered as a set of three Linux packages:
* oracleasmlib-2.0 - the ASM libraries
* oracleasm-support-2.0 - utilities needed to administer ASMLib
* oracleasm - a kernel module for the ASM library
Each Linux distribution has its own set of ASMLib 2.0 packages, and within each distribution, each kernel version has a corresponding oracleasm package. The following paragraphs describe how to determine which set of packages you need.
First, determine which kernel you are using by logging in as root and running the following command:
uname -rm
Ex:
# uname -rm
2.6.9-22.ELsmp i686
The example shows that this is a 2.6.9-22 kernel for an SMP (multiprocessor) box using Intel i686 CPUs.
Use this information to find the correct ASMLib packages on OTN:
1. Point your Web browser to http://www.oracle.com/technology/tech/linux/asmlib/index.html
2. Select the link for your version of Linux.
3. Download the oracleasmlib and oracleasm-support packages for your version of Linux
4. Download the oracleasm package corresponding to your kernel. In the example above, the oracleasm-2.6.9-22.ELsmp-2.0.0-1.i686.rpm package was used.
Next, install the packages by executing the following command as root:
rpm -Uvh oracleasm-kernel_version-asmlib_version.cpu_type.rpm \
oracleasmlib-asmlib_version.cpu_type.rpm \
oracleasm-support-asmlib_version.cpu_type.rpm
Ex:
# rpm -Uvh \
> oracleasm-2.6.9-22.ELsmp-2.0.0-1.i686.rpm \
> oracleasmlib-2.0.1-1.i386.rpm \
> oracleasm-support-2.0.1-1.i386.rpm
Preparing... ########################################### [100%]
1:oracleasm-support ########################################### [ 33%]
2:oracleasm-2.6.9-22.ELsm########################################### [ 67%]
3:oracleasmlib ########################################### [100%]
Configuring ASMLib
Before using ASMLib, you must run a configuration script to prepare the driver. Run the following command as root, and answer the prompts as shown in the example below.
# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Fix permissions of Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: [ OK ]
Creating /dev/oracleasm mount point: [ OK ]
Loading module "oracleasm": [ OK ]
Mounting ASMlib driver filesystem: [ OK ]
Scanning system for ASM disks: [ OK ]
Next you tell the ASM driver which disks you want it to use. Oracle recommends that each disk contain a single partition for the entire disk. See Partitioning the Disks at the beginning of this section for an example of creating disk partitions.
You mark disks for use by ASMLib by running the following command as root:
/etc/init.d/oracleasm createdisk DISK_NAME device_name
Tip: Enter the DISK_NAME in UPPERCASE letters.
Ex:
# /etc/init.d/oracleasm createdisk VOL1 /dev/sdb1
Marking disk "/dev/sdb1" as an ASM disk: [ OK ]
# /etc/init.d/oracleasm createdisk VOL1 /dev/sdc1
Marking disk "/dev/sdc1" as an ASM disk: [ OK ]
# /etc/init.d/oracleasm createdisk VOL1 /dev/sdd1
Marking disk "/dev/sdd1" as an ASM disk: [ OK ]
Verify that ASMLib has marked the disks:
# /etc/init.d/oracleasm listdisks
VOL1
VOL2
VOL3
Create the ASM Instance
ASM runs as a separate Oracle instance which can be created and configured using the Oracle Universal Installer. Now that ASMLib is installed and the disks are marked for use, you can create an ASM instance.
Log in as oracle and start runInstaller:
$ ./runInstaller
1. Select Installation Method
* Select Advanced Installation
* Click on Next
2. Specify Inventory Directory and Credentials
* Inventory Directory: /u01/app/oracle/oraInventory
* Operating System group name: oinstall
* Click on Next
3. Select Installation Type
* Select Enterprise Edition
* Click on Next
4. Specify Home Details
* Name: OraDB10gASM
* Path: /u01/app/oracle/product/10.2.0/asm
Note:Oracle recommends using a different ORACLE_HOME for ASM than the ORACLE_HOME used for the database for ease of administration.
* Click on Next
5. Product-specific Prerequisite Checks
* If you've been following the steps in this guide, all the checks should pass without difficulty. If one or more checks fail, correct the problem before proceeding.
* Click on Next
6. Select Configuration Option
* Select Configure Automatic Storage Management (ASM)
* Enter the ASM SYS password and confirm
* Click on Next
7. Configure Automatic Storage Management
* Disk Group Name: DATA
* Redundancy
- High mirrors data twice.
- Normal mirrors data once. This is the default.
- External does not mirror data within ASM. This is typically used if an external RAID array is providing redundancy.
* Add Disks
The disks you configured for use with ASMLib are listed as Candidate Disks. Select each disk you wish to include in the disk group.
* Click on Next
8. Summary
* A summary of the products being installed is presented.
* Click on Install.
9. Execute Configuration Scripts
* At the end of the installation, a pop up window will appear indicating scripts that need to be run as root. Login as root and run the indicated scripts.
* Click on OK when finished.
10. Configuration Assistants
* The Oracle Net, Oracle Database, and iSQL*Plus configuration assistants will run automatically
11. End of Installation
* Make note of the URLs presented in the summary, and click on Exit when ready.
12. Congratulations! Your new Oracle ASM Instance is up and ready for use.
Kind regards
Mohamed -
Hi all,
Oracle unbreakable linux
oracle 10.2.0.1
I got this error while mark ing the disks for use by ASMLib
/etc/init.d/oracleasm createdisk VOL1 [failed]
I already performed the steps mentioned below
uname -rm
Ex:
# uname -rm
2.6.9-22.ELsmp i686
The example shows that this is a 2.6.9-22 kernel for an SMP (multiprocessor) box using Intel i686 CPUs.
Use this information to find the correct ASMLib packages on OTN:
1. Point your Web browser to http://www.oracle.com/technology/tech/linux/asmlib/index.html
2. Select the link for your version of Linux.
3. Download the oracleasmlib and oracleasm-support packages for your version of Linux
4. Download the oracleasm package corresponding to your kernel. In the example above, the oracleasm-2.6.9-22.ELsmp-2.0.0-1.i686.rpm package was used.
Next, install the packages by executing the following command as root:
rpm -Uvh oracleasm-kernel_version-asmlib_version.cpu_type.rpm \
oracleasmlib-asmlib_version.cpu_type.rpm \
oracleasm-support-asmlib_version.cpu_type.rpm
Ex:
# rpm -Uvh \
> oracleasm-2.6.9-22.ELsmp-2.0.0-1.i686.rpm \
> oracleasmlib-2.0.1-1.i386.rpm \
> oracleasm-support-2.0.1-1.i386.rpm
Preparing... ########################################### [100%]
1:oracleasm-support ########################################### [ 33%]
2:oracleasm-2.6.9-22.ELsm########################################### [ 67%]
3:oracleasmlib ########################################### [100%]
Configuring ASMLib
Before using ASMLib, you must run a configuration script to prepare the driver. Run the following command as root, and answer the prompts as shown in the example below.
# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Fix permissions of Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: [ OK ]
Creating /dev/oracleasm mount point: [ OK ]
Loading module "oracleasm": [ OK ]
Mounting ASMlib driver filesystem: [ OK ]
Scanning system for ASM disks: [ OK ]
but when i tried this
/etc/init.d/oracleasm createdisk VOL1 /dev/sda2
Marking disk "/dev/sda2" as an ASM disk: [ Failed]
i got this error
Please give me the solution,
ThanksI have found this on /var/log/oracleasm
Creating /dev/oracleasm mount point: /dev/oracleasm
Loading module "oracleasm": oracleasm
Mounting ASMlib driver filesystem: /dev/oracleasm
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
oracleasm-read-label: Unable to open device "/dev/dm-0": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-0": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-0": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-0": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-1": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-1": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-1": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-1": No such file or directory
Unable to open device "/dev/sda2": Device or resource busy
Unable to open device "/dev/sda1": Device or resource busy
Unable to open device "/dev/sda": Device or resource busy
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
oracleasm-read-label: Unable to open device "/dev/dm-0": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-0": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-0": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-0": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-1": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-1": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-1": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-1": No such file or directory
Unable to open device "/dev/sda2": Device or resource busy
Unable to open device "/dev/sda1": Device or resource busy
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
oracleasm-read-label: Unable to open device "/dev/dm-0": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-0": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-0": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-0": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-1": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-1": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-1": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-1": No such file or directory
Unable to open device "/dev/sda2": Device or resource busy
Unable to open device "/dev/sda2": Device or resource busy
Unable to open device "/dev/sda2": Device or resource busy
Creating /dev/oracleasm mount point: /dev/oracleasm
Loading module "oracleasm": oracleasm
Mounting ASMlib driver filesystem: /dev/oracleasm
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
oracleasm-read-label: Unable to open device "/dev/dm-0": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-0": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-0": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-0": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-1": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-1": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-1": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-1": No such file or directory
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
oracleasm-read-label: Unable to open device "/dev/dm-0": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-0": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-0": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-0": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-1": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-1": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-1": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-1": No such file or directory
Unable to open device "/dev/sda2": Device or resource busy
Unable to open device "/dev/sda1": Device or resource busy
Unable to open device "/dev/sda": Device or resource busy
Unable to open device "/dev/sda1": Device or resource busy
Unable to open device "/dev/sda2": Device or resource busy
Unable to open device "/dev/sda2": Device or resource busy
Unable to query file "/dev/sda2p1": No such file or directory
Unable to open device "/dev/sda1": Device or resource busy
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
oracleasm-read-label: Unable to open device "/dev/dm-0": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-0": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-0": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-0": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-1": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-1": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-1": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-1": No such file or directory
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
oracleasm-read-label: Unable to open device "/dev/dm-0": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-0": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-0": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-0": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-1": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-1": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-1": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-1": No such file or directory
Unable to open device "/dev/sda2": Device or resource busy
Unable to open device "/dev/sda1": Device or resource busy
Unable to open device "/dev/sda": Device or resource busy
Unable to query file "/dev/sdap1": No such file or directory
Disk "VOL1" does not exist or is not instantiated
Unable to query file "/dev/sdap1": No such file or directory
Unable to query file "/dev/sda2p1": No such file or directory
Unable to query file "/dev/sdap1": No such file or directory
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
oracleasm-read-label: Unable to open device "/dev/dm-0": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-0": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-0": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-0": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-1": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-1": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-1": No such file or directory
oracleasm-read-label: Unable to open device "/dev/dm-1": No such file or directory
Unable to query file "/dev/sda2p2": No such file or directory
Unable to query file "/dev/sda2p2": No such file or directory
Unable to query file "/dev/sda2p3": No such file or directory
Unable to query file "/dev/sda2p4": No such file or directory
Unable to query file "/dev/sda2p2": No such file or directory
Unable to query file "/dev/sda2p3": No such file or directory
Unable to query file "/dev/sda2p4": No such file or directory
Unable to open device "/dev/sda3": Device or resource busy -
2.4.21-138-smp or 2.4.21-138-default, any difference
I have installed SuSE Linux Enterprise Server prior to Oracle Database 10g.
If I run
#uname -r
2.4.21-138-smp --- I got values
Oracle Installation guide (Part No. B10811-02, page 2-21) recommends for kernal as below
run
#uname -r
2.4.21-138-default -- should give this value
Are there any differnce between default & smp.
Dsmp is for multiprocessor servers
-
MacPro - support for Intel Multiprocessor spec?
Does anyone know if the Intel MacPro is compliant with the Intel Multiprocessor spec 1.4 (or later)? (This document was originally written with PC/AT compatible architectures in mind.) The reason I ask is that I'm designing my own SMP OS (for a school project), and I'd like to use a 4-core MacPro as the hw platform. If the MP spec does not apply, is there somewhere I can get the equivalent info for the MacPro?
I think I may have found a solution on my own. posting to help others...
I happened upon this post that said they encountered problems with just the rear port of the mac pro. I switched to the front port and sure enough it seems for now at least to have gone away. hallelujah!
here is the post on the rear port being off
http://lists.apple.com/archives/Firewire/2006/Oct/msg00031.html -
Error while deploying an Agentry application on SMP 2.3 Server
Hello Experts,
I am trying to deploy a customized SAPWM application on the SMP 2.3 server.
I am referring to the tutorial maintained at the following URL :http://scn.sap.com/docs/DOC-43353
I have zipped the contents of the application folder (under Serverdev) and added the required DLLs and JAR files.
While deploying using SCC (Control center), I get an error which says "Application registration failed".
Under logs, I could find the following entry:
[com.syclo.agentry.admin.implementation.ClientStatusSocket] [] [] [System Connections] not found - please use editor to publish application then restart the server.
Thread-1128 [com.syclo.agentry.admin.implementation.ClientStatusSocket] [] [] 11:25:31 04/25/2014 25 General 0 Unknown Exception [System Connections] section not found in Agentry.ini file (Publish from editor to correct), agent\ChickamingAgent.cpp#2423:ChickamingAgent::startup
ERROR MMS Thread-1128 [com.sybase.sup.agentry.service.AgentryServerListenerImpl] [] [] Agentry application [com.sap.agentry.sapwm] report error: [2014-04-25 11:25:24.151] errorClassCode=[2
The deployed zip file looks like this:
I also checked up another thread (Setup Work Manager on SMP2.3) on the same post, but the thread owner was able to resolve the issue after he stopped the server instance and deployed again. However, it didn't work for us.
Questions:
1) How can I export the application in ".agp" package?
2) How can we resolve the deployment error? The Agentry.ini contained within the package does have system connections section with HTTPXML, JavaBE and SQL DLL files.
Appreciate your help on the same.
Best,
Arihant Kothari
Tags edited by: Michael ApplebyHello Abhishek
thanks for your reply there.. We did get the app name as follows when we tried to deploy the application in SMP 2.3 "Even though it errored out saying - Unable to register the application"
D:\SAP\MobilePlatform\Servers\UnwiredServer\Repository\Agentry\default\com.sap.agentry.sapwm53
However we manually unzipped the agentry app into this folder as per instructions from agentry app deployment on SMP 3.0
What do you mean by "After your appname you should not have any other folder" - clearly if that is the case then we have "Development" folder and some additional folders beneath this.
Could you please suggest?
Thanks,
Raza. -
Cannot see Business Objects Repository in SAP production server from Worskpace - SMP 2.3
Hi all,
I have problems with reading RFC from production server, because BOR isn't visible at all in Mobile Workspace. Maybe I do something wrong so let me explain what am trying to accomplish. I need to make applications work on production server. Until now they worked and were tested on development server. Applications are native Android with MBO (SMP 2.3.3). So my guess is that I need to transport RFC functions from development to production, which I did, then to make new connection to production server in workspace and generate MBOs and code from them that will finally replace the old MBO code in Android application. If that is the procedure, then the only problem is that I can't see those RFC in production. My user have sap all privileges and in them S_RFC authorization object so I guess authorization isn't the problem. I also tried to switch the language in workspace connection because last time (on development) that was the problem. Any idea somebody?Well there is only one mobile server. I don't know exactly how they (client) think it will work but when I say production server I refer to SAP EIS production server.
Anyway the solution to the problem with BOR visibility is this note:
Note 706195 - BAPIs are missing in the component hierarchy display
Thanks Midhun! I will probably have more questions.. -
Wait/notify, await/signal, faster blockingqueue that scales with N threads
Hi,
I have been benchmarking a blockingqueue. It holds 100 items before writers block. It uses not-empty/not-full semaphores. Typical stuff.
I have noticed that with 1 writer and 1 reader threads, using synchronized()+wait/notify is faster than reentrantlock+await/signal.
I tried to find the point (in number of W/R threads) where reentrant lock is better.
For the remainder os the discussion, I must say that I never use 'fair' rentrantlocks: I tested them and they are always slower than synchronized.
So, I always use 'unfair' locks.
The thing is, the tests results are messed up. I mean I would expect a monotonous progression in reentrant lock performance as the number of W/R threads is increasing. But the reality (on a dual core dual opteron) shows strange progressions. Without diving into numbers...
I would like to hear about the experiences of other people relatively to:
-queue implementations and readers semaphore, writers semaphores most efficient patterns.
-scalability observations and implementation choices related to the number of threads to be concurrent.
Of course I have been experimenting with notify()/signal() instead of notifyAll()/signalAll() in order to avoid waking up too many writers/readers that do not stand a chance to perform their enqueue/dequeue without going back to wait()/await() again (in my case, fairness isn't an issue for readers, and for the moment, I accept unfair enqueue from writers). Also, a reader can notify/signal not only a waiting writer but another waiting reader if the queue isn't empty after its own dequeue. I'm about to do the dual notify/signal for writers: not only notify/signal a waiting reader but also another waiting writer if the queue isn't full after its own enqueue.
Of course, this good-intentions implementation ends up notifying/signaling a lot. I'm searching for a new way of thinking, in case I have been blinded by too much obsession on my current implementation...! :-)
Thanks.
PS: for those of you that wonders why I don't use j.u.c array blocking queue, that's because I need:
a) many queues enqueue to be able to notify/signal a single thread (1 thread waiting to read many queues). This implies an externally plugged-in readers (not-empty) semaphore.
b) enqueueMany(array), dequeueMany(int max) ->arrayIn Java 5 ReentrantLock provides much better performance under contention than built-in sync. Conversely built-in uncontended sync is always much faster. In Java 6 contended built-in sync has pulled back some ground on ReentrantLock. So with only two threads it is not surprising that built-in sync is faster.
So the switch over point depends on the level of contention. This is a function of the number of threads (and CPU's) and what they do while holding the lock and between holding the lock.
For evaluating read/write synchronization you need to have a read operation that is relatively long to dominate the cost the heavier read-lock. You also need sufficient parallelism to allow enough concurrent readers to make overall reader "throughput" significant.
Benchmarks are seldom that useful/insightful unless realistic access patterns and workloads are used. -
MRS Push with SMP 3.0 and Service Manager 4.2 is not working
Hi All,
I am working on SMP 3.0 SP 06 Service Manager 4.2 application .
I have configured MRS Push which is not working . Service Order push is working fine.
If anyone has configured MRS push with any one the Syclo mobile products ,Please share the steps.
Thanks in advance.
Thanks
NehaNeha,
Can you refer this OSS note: 2014454 for MRS setup.
Thanks,
Manju -
Schema Data Type in SOAP Web Service while using Integration Gateway in SMP 3.0
Hi Experts,
I was working on Integration gateway component of SMP 3.0.3 where we can have oData services which connect to different data source from SMP and finally we have to consume from SMP. Here I have an SOAP Web service where there is Schema Data type which is an xml structure and because of that while doing the data modelling with Design time tools I am not able to map the properties as there aren't any as only the parent level Schema type is available in the SOAP Web Services. Please see the below image for reference :
So now I have 2 inputs no problems for design as such then I have the schema for that which comes as a output response which is where I am facing the issue as we don't have that Data Structure itself so how are we going to map that. I have seen some thin possibilities with Custom Scripts with SMP SP06 where this will help us to process the request and response at runtime with JS/Groovy. So needed some lights on this schema data type on Integration Gateway component of SMP 3.0.3 which we are planning to upgrade to SP06 as well so it will be a good starting point for this as well
Also have concerned my good friend Rakshit Doshi for this as well.
Regards,
Fenil.Hi All,
Sorry for the late response guys was stuck somewhere else and so couldn't reply to this, see I have below response in SOAP UI
There if we see we have the schema as the whole structure being defined under which we have all the child elements, am also posting the raw response from the soapUI below for better understanding
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetMSUserLoginDetailsResponse xmlns="http://tempuri.org/">
<GetMSUserLoginDetailsResult>
<xs:schema id="MemberDetails" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="MemberDetails" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Table">
<xs:complexType>
<xs:sequence>
<xs:element name="RECID" type="xs:string" minOccurs="0"/>
<xs:element name="FNAME" type="xs:string" minOccurs="0"/>
<xs:element name="LNAME" type="xs:string" minOccurs="0"/>
<xs:element name="CUSTNO" type="xs:decimal" minOccurs="0"/>
<xs:element name="MEMTYP" type="xs:decimal" minOccurs="0"/>
<xs:element name="MEMTYPENAME" type="xs:string" minOccurs="0"/>
<xs:element name="CUSTTYP" type="xs:decimal" minOccurs="0"/>
<xs:element name="EMAIL" type="xs:string" minOccurs="0"/>
<xs:element name="MEMPASSWORD" type="xs:string" minOccurs="0"/>
<xs:element name="ISDEBIT" type="xs:decimal" minOccurs="0"/>
<xs:element name="PARENTID" type="xs:string" minOccurs="0"/>
<xs:element name="CHILDOF" type="xs:string" minOccurs="0"/>
<xs:element name="CUSTTYP1" type="xs:string" minOccurs="0"/>
<xs:element name="ZONEID" type="xs:int" minOccurs="0"/>
<xs:element name="EMAILFOOTERDETAIL" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Table1">
<xs:complexType>
<xs:sequence>
<xs:element name="ErrorCode" type="xs:string" minOccurs="0"/>
<xs:element name="ErrorDesc" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
<MemberDetails xmlns="">
<Table diffgr:id="Table1" msdata:rowOrder="0">
<RECID>97101-101-0000057069</RECID>
<FNAME>Fenil</FNAME>
<LNAME>Doshi</LNAME>
<CUSTNO>1042231</CUSTNO>
<MEMTYP>42</MEMTYP>
<MEMTYPENAME>Management</MEMTYPENAME>
<CUSTTYP>8</CUSTTYP>
<EMAIL>[email protected]</EMAIL>
<MEMPASSWORD>as</MEMPASSWORD>
<PARENTID>97101-101-0000057069</PARENTID>
<CUSTTYP1>Zone</CUSTTYP1>
<ZONEID>2</ZONEID>
<EMAILFOOTERDETAIL><![CDATA[<strong></strong><br />]]></EMAILFOOTERDETAIL>
</Table>
<Table1 diffgr:id="Table11" msdata:rowOrder="0">
<ErrorCode>100</ErrorCode>
<ErrorDesc>Login Successful.</ErrorDesc>
</Table1>
</MemberDetails>
</diffgr:diffgram>
</GetMSUserLoginDetailsResult>
</GetMSUserLoginDetailsResponse>
</soap:Body>
</soap:Envelope>
So we have the data but as a xml Structure which is nothing but schema and is my Eclipse while mapping while defining response type it gives me just an schema as the property.
Regards,
Fenil. -
How to configure Oracle DB in SMP 3.0
Hi guys,
Has anyone worked on configuration of Oracle DB in SMP 3.0 installation. I installed Oracle DB on the same server of SMP. The installation guide mentions to run the particular script using SQLPlus
4.
Host name – the host system on which the database software is installed.
Login – the admin login for the database software.
Port number – the port number the database software uses.
If you installed Oracle on a different server from the one where you will install SAP Mobile Platform Server, copy the db_tools directory (and all subdirectories) from the SAP Mobile Platform Server installer image to a temporary location on the database server. In the steps below, <installer_root> will refer to the directory into which you copied db_tools.
Create and run the smp3.sql script.
a. b.
c. d.
e. f.
Open a Windows command prompt.
In the SAP Mobile Platform installer image, navigate to: <installer_root>\db_tools\db\oracle\smp3\sql
Use a text editor to create a smp3.sql file in this location.
Use a text editor to open 001_SMP3_drop_and_create_user.DDL from this location and copy its entire contents into the smp3.sql file.
As the last line in the smp3.sql file, enter:
EXIT;
(Optional) Change user name and password.
This example shows a contiguous block of the noncomment lines in the 001_SMP3_drop_and_create_user.DDL file for ASE is shown below. Replace:
gomobile with the new database user name.
secret with the new database user password. Be sure to:
Refer to your database documentation for limitations on length and allowable characters for these parameters.
Replace all instances of each default text string in the 001_SMP3_drop_and_create_user.DDL script with the same value.
Make note of the changes you make. You will need to enter the changed values during SAP Mobile Platform Server installation.
Replace highlighted items below as needed to implement the changes you wish to make.
DROP USER gomobile CASCADE; CREATE USER gomobile
IDENTIFIED BY secret
DEFAULT TABLESPACE USERS TEMPORARY TABLESPACE TEMP
PROFILE DEFAULT
ACCOUNT UNLOCK;
GRANT SY365_OBJOWNER TO gomobile; GRANT CREATE SESSION TO gomobile;
14
SAP Mobile Platform
Installing SAP Mobile Platform on a Single Server
GRANT CONNECT TO gomobile;
ALTER USER gomobile DEFAULT ROLE ALL;
ALTER USER gomobile QUOTA UNLIMITED ON USERS;
Note: Oracle does not define a database name as such, and by convention uses the same name for the user and the schema. The SAP Mobile Platform Server installer needs either the Oracle service name or SID to connect to your Oracle database.
Save and close smp3.sql.
Enter: sqlplus <username>/<password>@<servername> @smp3.sql > smp3.log
Where:
<servername> is the server where Oracle is installed.
<username> is an admin user, such as sa.
<password> is the password for <username>.
I am running the same but getting an error with using user name as sys and password is 123456.
ERROR:
ORA-12541: TNS:no listener
Enter user-name:
Has anyone run this successfully.
Thanks,
Regards,
Rakshit DoshiRakshit,
The TNS: no listener error indicates that your Oracle installation is not setup correctly for you to connect via SqlPlus. This error has nothing to do with SMP3 but with he base Oracle installation. Please troubleshoot that error and ensure you can connect via SqlPlus independent of SMP3.0 and then try the steps again.
--Bill -
SMP 2.3 Agentry update versions problem
Hi,
please I experienced issue when deploying new version of Agentry application to SMP 2.3. On devices we have stable old version. When we deploy new version through SCC on SMP and then we try to transmit device , it freezes on "Sending client info" . But in SCC it is running normally (e.g. when we reinstall client on device or reset ATE, it downloads new version with no problems).
Our steps are::
Deploy version 1
Make initial sync.
Deploy version 2
Make delta sync.
Expected result: new ersion is downloaded with delta sync correctly (currently we get freeze on “sending client info”).
Thank you for any help
MartinHi Steve,
we use Agentry_6.0.30 and I am talking about Application Logic release.
Thank you -
Issue while deploying Agentry application on local SMP server
Hello Experts,
I have deployed a customized SAPWM application on the SMP 2.3 server.
I am referring to the tutorial maintained at the following URL :http://scn.sap.com/docs/DOC-43353
After deployment, the status of the application is shown as "running_without_metadata".
Few sections from my agentry.INI (present under application's root folder (C:\SAP\MobilePlatform\Servers\UnwiredServer\Repository\Agentry\default\com.sap.agentry.wm53) are as follows.
[HTTPXML-2]
authenticationCertificateStore=MY
authenticationCertificateStorePassword=
authenticationCertificateStorePasswordEncoded=False
autoDequote=True
baseURL=http://localhost:8282
basicAuthenticationPassword=
basicAuthenticationPasswordEncoded=False
basicAuthenticationUserID=
constantsFile=httpxml_sd.ini
enableAuthentication=False
enablePreviousUserAuthentication=False
httpConnectTimeout=60
httpReceiveTimeout=300
httpResolveTimeout=60
httpSendTimeout=300
listenOn=8282
name=HTTP-XML Back End
timeZoneName=
timeout=300
trustedCertificateStore=
useSSL=False
xmlAllowXSLTScript=True
xmlNamespaces=
xmlResolveExternals=True
xmlValidateOnParse=True
[Java-1]
classPath=./ini4j.jar;./sapjco.jar;./Agentry-v5.jar;./SAPWM-5.3.0.0.jar;./SAPCommon-122971.jar;WMDeloitte.jar;
constantsFile=
deleteSource=True
enableAuthentication=True
enablePreviousUserAuthentication=False
initialHeapSize=256
maxHeapSize=512
name=Java Back End
outputDirectory=.
performCompile=False
printBusinessLogicStackTrace=False
printStackTrace=False
reduceOSSignalUse=True
scriptsPath=
serverClass=com/syclo/sap/workmanager/Server
sourceDirectory=.
timeZoneName=
[File-1]
name=dos
enableAuthentication=false
enablePreviousUserAuthentication=false
allowPreviousUserLogin=false
userDomain=dev
tempPath=
[Configuration]
apnsCertificateDirectory=apnsCertificates
apnsCertificatePassword=Rzdrj~SwixoAqzmbVxgi
apnsCertificatePasswordEncoded=True
apnsEnabled=True
applicationGlobalsFile=Globals.ini
applicationStringsFile=ApplicationText.ini
clientStringNamesFile=ClientStringNames.ini
clientStringsFile=ClientText.ini
developmentServer=False
enableFailedTransactionLogging=True
enableOverrideFile=Enables.ini
enableTransactionFailureHandling=False
failedTransactionFilenameFormat=%{userid} %{transaction_name} %{date} %{time}-%{count}.xml
failedTransactionsQueue=FailedTransactionsQueue
gcmEnabled=True
gcmServerAuthorizationKey=Authorization:key=AIzaSyDi0qWQEewdbmNSV_o9QNtSQrlxPnBXtBM
gcmServerLink=https://android.googleapis.com/gcm/send
imagesPath=Application\Development\Images
localizationPath=
localizations=
overrideInfoTableDirectory=OverrideInfoTable
overrideTypesFile=OverrideTypes.ini
postedTransactionDirectory=posted
postedTransactionFile=%{device}.pli
scriptsPath=Application\Development\Scripts
spinDocIniFile=
threadCount=0
transmitConfigurationFile=TransmitConfigurations.ini
trustedCertificateStore=
updateIdleWait=60
updatePeriod=60
[Web Server Front End]
listenOn=80
permitGetCGI=true
xslDirectory=xsl
resourceDirectory=resource
authenticationCertificateStore=AgentryServer.pfx
authenticationCertificateStorePassword=Rzdrj~SwixoAqzmbVxgi
authenticationCertificateStorePasswordEncoded=true
When I connect this application from my iPad with my machine's IP and port as 7003, I get an error saying "Invalid password for User <username>".
When I debugged this application in the ECC, in the BAPI /SYCLO/CORE_SUSR_LOGIN_CHECK, I saw that the Password being sent to the ECC was blank, inspite of entering the password on the application. (have run it for another user in ECC in the below screenshot).
Is something missing in the agentry.INI or application configuration on the SCC which is causing this issue?
Any help will be appreciated.If you are getting "running_without_metadata" this means the Agentry server did not load any application on start up.
1) In your Agentry.ini in the [Configuration] section what is developmentServer set to?
2) Depending on the value is where the Agentry Server looks for the application logic in the following locations:
Set to" True"
C:\SAP\MobilePlatform\Servers\UnwiredServer\Repository\Agentry\default\com.sap.agentry.wm53\Application\Development\
Set to false:
C:\SAP\MobilePlatform\Servers\UnwiredServer\Repository\Agentry\default\com.sap.agentry.wm53\Application\Production
In the above folder does it contain your application logic?
Stephen -
AppBuilder: Onboarding on SMP 2.3 failed
Hi all,
is there someone who has successfully used Appbuilder with SMP2.3? I have an application created on SMP2.3 and I can create a new connection for this application manually (using RestClient). But Appbuilder fails to onboard when I try to retrieve service information from a corresponding SMP server profile (401 - unauthorized).
Is there a change in user onboarding from 2.3 to 3.0 or should this work?
Best regards
MeinradIn a workshop material I read while configuring "SMP settings" in appbuilder that ,
"Security Config name will not be used in SMP3, it is only for SMP2.3 version." that made me to think of a possibility of on boarding with 2.3.
Also help me understand how appbulider on boarding happens with SMP cloud now (AppBuilder - Connect to SAP Mobile Platform Cloud Version).
Midhun VP
Maybe you are looking for
-
This is my first iPhone I am having problems with my battery life. I recently updated to the new operating system for the iPhone 4S. I am losing battery life at a quick rate is there anything that I can do.
-
HT201272 How to restore purchased album from iTunes
I use iOS 7.1 in my 4s and 3 days ago Music app keep on freezing. Yesterday, after I hard-reset the phone (sleep & home button pressed together), all music is gone. It appeared like I need to download again from iTunes. But today, it's all gone. No l
-
I have just installed prem elements 9 onto a new PC and it will not open any of the old projects
When I try to open any of the previous projects or any video file it comes up with the error message that the file format is not supported or the codex missing,. the same file will open OK on the old PC. This probems occurs for all video formats.
-
File content conversion suggestions Please
Hello Experts, I am using MQ - JMS Sender Adapter where in Module Tab I need to convert the following file to Header & Detail record I am getting the file from the MQ- Series as a Straight line no breaks 1) The first 70 char length of the line is al
-
Is it possible that my update stats used only correct tables?
Whenever there is a schedule maintenance run I receive a error: Executing the query "UPDATE STATISTICS [Perf].[PerfHourly_F65954CD35A54..." failed with the following error: "Table 'PerfHourly_F65954CD35A549E886A48E53F148F277' does not exist.". Possib